OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |