| 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 | 9 |
| 9 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 10 #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" |
| 13 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/sync/profile_sync_service_factory.h" | 15 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 13 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 16 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 14 #include "components/keyed_service/core/service_access_type.h" | 17 #include "components/keyed_service/core/service_access_type.h" |
| 15 #include "components/precache/content/precache_manager.h" | 18 #include "components/precache/content/precache_manager.h" |
| 16 #include "components/precache/core/precache_database.h" | 19 #include "components/precache/core/precache_database.h" |
| 17 #include "content/public/browser/browser_context.h" | 20 #include "content/public/browser/browser_context.h" |
| 18 | 21 |
| 19 namespace precache { | 22 namespace precache { |
| 20 | 23 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 45 new PrecacheDatabase()); | 48 new PrecacheDatabase()); |
| 46 base::FilePath db_path(browser_context->GetPath().Append( | 49 base::FilePath db_path(browser_context->GetPath().Append( |
| 47 base::FilePath(FILE_PATH_LITERAL("PrecacheDatabase")))); | 50 base::FilePath(FILE_PATH_LITERAL("PrecacheDatabase")))); |
| 48 return new PrecacheManager( | 51 return new PrecacheManager( |
| 49 browser_context, | 52 browser_context, |
| 50 ProfileSyncServiceFactory::GetSyncServiceForBrowserContext( | 53 ProfileSyncServiceFactory::GetSyncServiceForBrowserContext( |
| 51 browser_context), | 54 browser_context), |
| 52 HistoryServiceFactory::GetForProfile( | 55 HistoryServiceFactory::GetForProfile( |
| 53 Profile::FromBrowserContext(browser_context), | 56 Profile::FromBrowserContext(browser_context), |
| 54 ServiceAccessType::IMPLICIT_ACCESS), | 57 ServiceAccessType::IMPLICIT_ACCESS), |
| 58 DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
| 59 browser_context), |
| 55 db_path, std::move(precache_database)); | 60 db_path, std::move(precache_database)); |
| 56 } | 61 } |
| 57 | 62 |
| 58 } // namespace precache | 63 } // namespace precache |
| OLD | NEW |