| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 return new FaviconService(static_cast<Profile*>(profile)); | 420 return new FaviconService(static_cast<Profile*>(profile)); |
| 421 } | 421 } |
| 422 | 422 |
| 423 void TestingProfile::CreateFaviconService() { | 423 void TestingProfile::CreateFaviconService() { |
| 424 // It is up to the caller to create the history service if one is needed. | 424 // It is up to the caller to create the history service if one is needed. |
| 425 FaviconServiceFactory::GetInstance()->SetTestingFactory( | 425 FaviconServiceFactory::GetInstance()->SetTestingFactory( |
| 426 this, BuildFaviconService); | 426 this, BuildFaviconService); |
| 427 } | 427 } |
| 428 | 428 |
| 429 static KeyedService* BuildHistoryService(content::BrowserContext* profile) { | 429 static KeyedService* BuildHistoryService(content::BrowserContext* profile) { |
| 430 return new HistoryService(static_cast<Profile*>(profile)); | 430 return new HistoryService(NULL, static_cast<Profile*>(profile)); |
| 431 } | 431 } |
| 432 | 432 |
| 433 bool TestingProfile::CreateHistoryService(bool delete_file, bool no_db) { | 433 bool TestingProfile::CreateHistoryService(bool delete_file, bool no_db) { |
| 434 DestroyHistoryService(); | 434 DestroyHistoryService(); |
| 435 if (delete_file) { | 435 if (delete_file) { |
| 436 base::FilePath path = GetPath(); | 436 base::FilePath path = GetPath(); |
| 437 path = path.Append(chrome::kHistoryFilename); | 437 path = path.Append(chrome::kHistoryFilename); |
| 438 if (!base::DeleteFile(path, false) || base::PathExists(path)) | 438 if (!base::DeleteFile(path, false) || base::PathExists(path)) |
| 439 return false; | 439 return false; |
| 440 } | 440 } |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 path_, | 985 path_, |
| 986 delegate_, | 986 delegate_, |
| 987 extension_policy_, | 987 extension_policy_, |
| 988 pref_service_.Pass(), | 988 pref_service_.Pass(), |
| 989 incognito_, | 989 incognito_, |
| 990 guest_session_, | 990 guest_session_, |
| 991 managed_user_id_, | 991 managed_user_id_, |
| 992 policy_service_.Pass(), | 992 policy_service_.Pass(), |
| 993 testing_factories_)); | 993 testing_factories_)); |
| 994 } | 994 } |
| OLD | NEW |