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