OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ |
7 | 7 |
| 8 #include "base/gtest_prod_util.h" |
8 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
9 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/sessions/session_service.h" | 11 #include "chrome/browser/sessions/session_service.h" |
11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 12 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
12 | 13 |
13 // Singleton that owns all SessionServices and associates them with | 14 // Singleton that owns all SessionServices and associates them with |
14 // Profiles. Listens for the Profile's destruction notification and cleans up | 15 // Profiles. Listens for the Profile's destruction notification and cleans up |
15 // the associated SessionService. | 16 // the associated SessionService. |
16 class SessionServiceFactory : public BrowserContextKeyedServiceFactory { | 17 class SessionServiceFactory : public BrowserContextKeyedServiceFactory { |
17 public: | 18 public: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 ~SessionServiceFactory() override; | 64 ~SessionServiceFactory() override; |
64 | 65 |
65 // BrowserContextKeyedServiceFactory: | 66 // BrowserContextKeyedServiceFactory: |
66 KeyedService* BuildServiceInstanceFor( | 67 KeyedService* BuildServiceInstanceFor( |
67 content::BrowserContext* profile) const override; | 68 content::BrowserContext* profile) const override; |
68 bool ServiceIsCreatedWithBrowserContext() const override; | 69 bool ServiceIsCreatedWithBrowserContext() const override; |
69 bool ServiceIsNULLWhileTesting() const override; | 70 bool ServiceIsNULLWhileTesting() const override; |
70 }; | 71 }; |
71 | 72 |
72 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ | 73 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ |
OLD | NEW |