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