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 "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
11 #include "components/password_manager/core/browser/log_router.h" | 11 #include "components/password_manager/core/browser/log_router.h" |
12 | 12 |
13 namespace content { | |
14 class BrowserContext; | |
15 } | |
16 | |
17 namespace password_manager { | 13 namespace password_manager { |
18 | 14 |
19 // Collects the logs for the password manager internals page and distributes | 15 // Collects the logs for the password manager internals page and distributes |
20 // them to all open tabs with the internals page. | 16 // them to all open tabs with the internals page. |
21 class PasswordManagerInternalsService : public KeyedService, | 17 class PasswordManagerInternalsService : public KeyedService, |
22 public LogRouter { | 18 public LogRouter { |
23 public: | 19 public: |
24 // 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: |
25 // 1) There is one service per each non-incognito BrowserContext. | 21 // 1) There is one service per each non-incognito BrowserContext. |
26 // 2) No service will be created for an incognito BrowserContext. | 22 // 2) No service will be created for an incognito BrowserContext. |
27 // Both properties are guarantied by the BrowserContextKeyedFactory framework, | 23 // Both properties are guarantied by the BrowserContextKeyedFactory framework, |
28 // so the service itself does not need the context on creation. | 24 // so the service itself does not need the context on creation. |
29 PasswordManagerInternalsService(); | 25 PasswordManagerInternalsService(); |
30 ~PasswordManagerInternalsService() override; | 26 ~PasswordManagerInternalsService() override; |
31 | 27 |
32 private: | 28 private: |
33 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsService); | 29 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsService); |
34 }; | 30 }; |
35 | 31 |
36 } // namespace password_manager | 32 } // namespace password_manager |
37 | 33 |
38 #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 |