OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/precache/precache_manager_factory.h" | 5 #include "chrome/browser/precache/precache_manager_factory.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "chrome/browser/history/history_service_factory.h" | 11 #include "chrome/browser/history/history_service_factory.h" |
12 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 12 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
13 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 13 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 14 #include "chrome/browser/precache/precache_util.h" |
14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/sync/profile_sync_service_factory.h" | 16 #include "chrome/browser/sync/profile_sync_service_factory.h" |
16 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 17 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
17 #include "components/keyed_service/core/service_access_type.h" | 18 #include "components/keyed_service/core/service_access_type.h" |
18 #include "components/precache/content/precache_manager.h" | 19 #include "components/precache/content/precache_manager.h" |
19 #include "components/precache/core/precache_database.h" | 20 #include "components/precache/core/precache_database.h" |
20 #include "content/public/browser/browser_context.h" | 21 #include "content/public/browser/browser_context.h" |
21 | 22 |
22 namespace precache { | 23 namespace precache { |
23 | 24 |
(...skipping 29 matching lines...) Expand all Loading... |
53 base::FilePath(FILE_PATH_LITERAL("PrecacheDatabase")))); | 54 base::FilePath(FILE_PATH_LITERAL("PrecacheDatabase")))); |
54 return new PrecacheManager( | 55 return new PrecacheManager( |
55 browser_context, | 56 browser_context, |
56 ProfileSyncServiceFactory::GetSyncServiceForBrowserContext( | 57 ProfileSyncServiceFactory::GetSyncServiceForBrowserContext( |
57 browser_context), | 58 browser_context), |
58 HistoryServiceFactory::GetForProfile( | 59 HistoryServiceFactory::GetForProfile( |
59 Profile::FromBrowserContext(browser_context), | 60 Profile::FromBrowserContext(browser_context), |
60 ServiceAccessType::IMPLICIT_ACCESS), | 61 ServiceAccessType::IMPLICIT_ACCESS), |
61 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( | 62 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
62 browser_context), | 63 browser_context), |
63 db_path, std::move(precache_database)); | 64 db_path, std::move(precache_database), |
| 65 base::Bind(&precache::RegisterPrecacheSyntheticFieldTrial)); |
64 } | 66 } |
65 | 67 |
66 } // namespace precache | 68 } // namespace precache |
OLD | NEW |