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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 305443004: Introduce HistoryClient interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@371825
Patch Set: Reupload with --no-find-copies Created 6 years, 6 months 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/components.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 return new FaviconService(static_cast<Profile*>(profile)); 419 return new FaviconService(static_cast<Profile*>(profile));
420 } 420 }
421 421
422 void TestingProfile::CreateFaviconService() { 422 void TestingProfile::CreateFaviconService() {
423 // It is up to the caller to create the history service if one is needed. 423 // It is up to the caller to create the history service if one is needed.
424 FaviconServiceFactory::GetInstance()->SetTestingFactory( 424 FaviconServiceFactory::GetInstance()->SetTestingFactory(
425 this, BuildFaviconService); 425 this, BuildFaviconService);
426 } 426 }
427 427
428 static KeyedService* BuildHistoryService(content::BrowserContext* profile) { 428 static KeyedService* BuildHistoryService(content::BrowserContext* profile) {
429 return new HistoryService(static_cast<Profile*>(profile)); 429 return new HistoryService(NULL, static_cast<Profile*>(profile));
430 } 430 }
431 431
432 bool TestingProfile::CreateHistoryService(bool delete_file, bool no_db) { 432 bool TestingProfile::CreateHistoryService(bool delete_file, bool no_db) {
433 DestroyHistoryService(); 433 DestroyHistoryService();
434 if (delete_file) { 434 if (delete_file) {
435 base::FilePath path = GetPath(); 435 base::FilePath path = GetPath();
436 path = path.Append(chrome::kHistoryFilename); 436 path = path.Append(chrome::kHistoryFilename);
437 if (!base::DeleteFile(path, false) || base::PathExists(path)) 437 if (!base::DeleteFile(path, false) || base::PathExists(path))
438 return false; 438 return false;
439 } 439 }
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 path_, 972 path_,
973 delegate_, 973 delegate_,
974 extension_policy_, 974 extension_policy_,
975 pref_service_.Pass(), 975 pref_service_.Pass(),
976 incognito_, 976 incognito_,
977 guest_session_, 977 guest_session_,
978 managed_user_id_, 978 managed_user_id_,
979 policy_service_.Pass(), 979 policy_service_.Pass(),
980 testing_factories_)); 980 testing_factories_));
981 } 981 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/components.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698