Chromium Code Reviews| 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. | |
|
Ilya Sherman
2014/05/07 00:28:39
nit: "the open tabs" -> "all open tabs"
vabr (Chromium)
2014/05/07 13:42:59
Done.
| |
| 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-incognito BrowserContext. | |
| 24 // 2) No service will be created for incognito BrowserContext. | |
|
Ilya Sherman
2014/05/07 00:28:39
nit: "for incognito BrowserContext" -> "for an inc
vabr (Chromium)
2014/05/07 13:42:59
Done.
| |
| 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 incognito. | |
|
Ilya Sherman
2014/05/07 00:28:39
nit: "May return" -> "Returns".
vabr (Chromium)
2014/05/07 13:42:59
The whole function was dropped (see Colin's commen
| |
| 31 static PasswordManagerInternalsService* Get(content::BrowserContext* context); | |
|
Ilya Sherman
2014/05/07 00:28:39
nit: Probably appropriate to name this GetForBrows
blundell
2014/05/07 09:05:15
This method will have to be eliminated for the ser
vabr (Chromium)
2014/05/07 13:42:59
Agreed, but I eventually dropped the function (see
vabr (Chromium)
2014/05/07 13:42:59
Done.
| |
| 32 | |
| 33 private: | |
| 34 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsService); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INTERNALS_SERVICE_H_ | |
| OLD | NEW |