OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
11 #include "chrome/browser/offline_pages/offline_page_metadata_store_impl.h" | |
12 #include "chrome/browser/offline_pages/offline_pages.pb.h" | |
13 #include "chrome/browser/profiles/incognito_helpers.h" | 11 #include "chrome/browser/profiles/incognito_helpers.h" |
14 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
16 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 14 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
17 #include "components/leveldb_proto/proto_database_impl.h" | 15 #include "components/leveldb_proto/proto_database_impl.h" |
| 16 #include "components/offline_pages/offline_page_metadata_store_impl.h" |
18 #include "components/offline_pages/offline_page_model.h" | 17 #include "components/offline_pages/offline_page_model.h" |
| 18 #include "components/offline_pages/proto/offline_pages.pb.h" |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
20 | 20 |
21 namespace offline_pages { | 21 namespace offline_pages { |
22 | 22 |
23 OfflinePageModelFactory::OfflinePageModelFactory() | 23 OfflinePageModelFactory::OfflinePageModelFactory() |
24 : BrowserContextKeyedServiceFactory( | 24 : BrowserContextKeyedServiceFactory( |
25 "OfflinePageModel", | 25 "OfflinePageModel", |
26 BrowserContextDependencyManager::GetInstance()) { | 26 BrowserContextDependencyManager::GetInstance()) { |
27 } | 27 } |
28 | 28 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return new OfflinePageModel(metadata_store.Pass(), background_task_runner); | 61 return new OfflinePageModel(metadata_store.Pass(), background_task_runner); |
62 } | 62 } |
63 | 63 |
64 content::BrowserContext* OfflinePageModelFactory::GetBrowserContextToUse( | 64 content::BrowserContext* OfflinePageModelFactory::GetBrowserContextToUse( |
65 content::BrowserContext* context) const { | 65 content::BrowserContext* context) const { |
66 return chrome::GetBrowserContextRedirectedInIncognito(context); | 66 return chrome::GetBrowserContextRedirectedInIncognito(context); |
67 } | 67 } |
68 | 68 |
69 } // namespace offline_pages | 69 } // namespace offline_pages |
70 | 70 |
OLD | NEW |