| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 } | 529 } |
| 530 | 530 |
| 531 WebDataService* TestingProfile::GetWebDataService(ServiceAccessType access) { | 531 WebDataService* TestingProfile::GetWebDataService(ServiceAccessType access) { |
| 532 return web_data_service_.get(); | 532 return web_data_service_.get(); |
| 533 } | 533 } |
| 534 | 534 |
| 535 WebDataService* TestingProfile::GetWebDataServiceWithoutCreating() { | 535 WebDataService* TestingProfile::GetWebDataServiceWithoutCreating() { |
| 536 return web_data_service_.get(); | 536 return web_data_service_.get(); |
| 537 } | 537 } |
| 538 | 538 |
| 539 PasswordStore* TestingProfile::GetPasswordStore(ServiceAccessType access) { | |
| 540 return NULL; | |
| 541 } | |
| 542 | |
| 543 void TestingProfile::SetPrefService(PrefService* prefs) { | 539 void TestingProfile::SetPrefService(PrefService* prefs) { |
| 544 prefs_.reset(prefs); | 540 prefs_.reset(prefs); |
| 545 } | 541 } |
| 546 | 542 |
| 547 void TestingProfile::CreateTestingPrefService() { | 543 void TestingProfile::CreateTestingPrefService() { |
| 548 DCHECK(!prefs_.get()); | 544 DCHECK(!prefs_.get()); |
| 549 testing_prefs_ = new TestingPrefService(); | 545 testing_prefs_ = new TestingPrefService(); |
| 550 prefs_.reset(testing_prefs_); | 546 prefs_.reset(testing_prefs_); |
| 551 Profile::RegisterUserPrefs(prefs_.get()); | 547 Profile::RegisterUserPrefs(prefs_.get()); |
| 552 browser::RegisterUserPrefs(prefs_.get()); | 548 browser::RegisterUserPrefs(prefs_.get()); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 754 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
| 759 return GetExtensionSpecialStoragePolicy(); | 755 return GetExtensionSpecialStoragePolicy(); |
| 760 } | 756 } |
| 761 | 757 |
| 762 void TestingProfile::DestroyWebDataService() { | 758 void TestingProfile::DestroyWebDataService() { |
| 763 if (!web_data_service_.get()) | 759 if (!web_data_service_.get()) |
| 764 return; | 760 return; |
| 765 | 761 |
| 766 web_data_service_->Shutdown(); | 762 web_data_service_->Shutdown(); |
| 767 } | 763 } |
| OLD | NEW |