OLD | NEW |
(Empty) | |
| 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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INTERNALS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_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 |
| 13 namespace content { |
| 14 class BrowserContext; |
| 15 } |
| 16 |
| 17 // Collects the logs for the password manager internals page and distributes |
| 18 // them to the open tabs with the internals page. |
| 19 class PasswordManagerInternalsService : public KeyedService, |
| 20 public password_manager::LogRouter { |
| 21 public: |
| 22 // There are only two ways in which the service depends on the BrowserContext: |
| 23 // 1) There is one service per non-off-the-record profile. |
| 24 // 2) No service will be created for off-the-record profiles. |
| 25 // Both properties are guarantied by the BrowserContextKeyedFactory framework, |
| 26 // so the service itself does not need the context on creation. |
| 27 PasswordManagerInternalsService(); |
| 28 virtual ~PasswordManagerInternalsService(); |
| 29 |
| 30 // May return NULL when |context| is off-the-record. |
| 31 static PasswordManagerInternalsService* Get(content::BrowserContext* context); |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsService); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INTERNALS_SERVICE_H_ |
OLD | NEW |