Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: chrome/browser/precache/precache_manager_factory.cc

Issue 2562573003: Create a synthetic field trial for precache (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698