Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
|
dougarnett
2016/05/03 18:32:40
2016
Pete Williamson
2016/05/03 21:34:42
Done.
| |
| 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_ANDROID_OFFLINE_PAGES_REQUEST_COORDINATOR_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_REQUEST_COORDINATOR_FACTORY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" | |
| 10 #include "content/public/browser/browser_context.h" | |
| 11 | |
| 12 namespace base { | |
| 13 template <typename T> | |
| 14 struct DefaultSingletonTraits; | |
| 15 } // namespace base | |
| 16 | |
| 17 namespace offline_pages { | |
| 18 | |
| 19 class RequestCoordinator; | |
| 20 | |
| 21 // A factory to create one unique RequestCoordinator. | |
| 22 class RequestCoordinatorFactory : public BrowserContextKeyedServiceFactory { | |
| 23 public: | |
| 24 static RequestCoordinatorFactory* GetInstance(); | |
| 25 static RequestCoordinator* GetForBrowserContext( | |
| 26 content::BrowserContext* context); | |
| 27 | |
| 28 private: | |
| 29 friend struct base::DefaultSingletonTraits<RequestCoordinatorFactory>; | |
| 30 | |
| 31 RequestCoordinatorFactory(); | |
| 32 ~RequestCoordinatorFactory() override {} | |
| 33 | |
| 34 KeyedService* BuildServiceInstanceFor( | |
| 35 content::BrowserContext* context) const override; | |
| 36 | |
| 37 content::BrowserContext* GetBrowserContextToUse( | |
| 38 content::BrowserContext* context) const override; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(RequestCoordinatorFactory); | |
| 41 }; | |
| 42 | |
| 43 } // namespace offline_pages | |
| 44 | |
| 45 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_REQUEST_COORDINATOR_FACTORY_H_ | |
| OLD | NEW |