1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_INTERNALS_SERVICE_H_ 6#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_INTERNALS_SERVICE_H_ 7 8#include <string> 9 10#include "components/keyed_service/core/keyed_service.h" 11#include "components/password_manager/core/browser/log_router.h" 12 13namespace content { 14class BrowserContext; 15} 16 17namespace password_manager { 18 19// Collects the logs for the password manager internals page and distributes 20// them to all open tabs with the internals page. 21class PasswordManagerInternalsService : public KeyedService, 22 public LogRouter { 23 public: 24 // There are only two ways in which the service depends on the BrowserContext: 25 // 1) There is one service per each non-incognito BrowserContext. 26 // 2) No service will be created for an incognito BrowserContext. 27 // Both properties are guarantied by the BrowserContextKeyedFactory framework, 28 // so the service itself does not need the context on creation. 29 PasswordManagerInternalsService(); 30 virtual ~PasswordManagerInternalsService(); 31 32 private: 33 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsService); 34}; 35 36} // namespace password_manager 37 38#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_INTERNALS_SERVICE_H_ 39