| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/testing_profile.h" | 5 #include "chrome/test/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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 360 } |
| 361 | 361 |
| 362 TestingProfile* TestingProfile::AsTestingProfile() { | 362 TestingProfile* TestingProfile::AsTestingProfile() { |
| 363 return this; | 363 return this; |
| 364 } | 364 } |
| 365 | 365 |
| 366 std::string TestingProfile::GetProfileName() { | 366 std::string TestingProfile::GetProfileName() { |
| 367 return std::string("testing_profile"); | 367 return std::string("testing_profile"); |
| 368 } | 368 } |
| 369 | 369 |
| 370 ProfileId TestingProfile::GetRuntimeId() { | |
| 371 return reinterpret_cast<ProfileId>(this); | |
| 372 } | |
| 373 | |
| 374 bool TestingProfile::IsOffTheRecord() { | 370 bool TestingProfile::IsOffTheRecord() { |
| 375 return incognito_; | 371 return incognito_; |
| 376 } | 372 } |
| 377 | 373 |
| 378 void TestingProfile::SetOffTheRecordProfile(Profile* profile) { | 374 void TestingProfile::SetOffTheRecordProfile(Profile* profile) { |
| 379 incognito_profile_.reset(profile); | 375 incognito_profile_.reset(profile); |
| 380 } | 376 } |
| 381 | 377 |
| 382 Profile* TestingProfile::GetOffTheRecordProfile() { | 378 Profile* TestingProfile::GetOffTheRecordProfile() { |
| 383 return incognito_profile_.get(); | 379 return incognito_profile_.get(); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 774 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
| 779 return GetExtensionSpecialStoragePolicy(); | 775 return GetExtensionSpecialStoragePolicy(); |
| 780 } | 776 } |
| 781 | 777 |
| 782 void TestingProfile::DestroyWebDataService() { | 778 void TestingProfile::DestroyWebDataService() { |
| 783 if (!web_data_service_.get()) | 779 if (!web_data_service_.get()) |
| 784 return; | 780 return; |
| 785 | 781 |
| 786 web_data_service_->Shutdown(); | 782 web_data_service_->Shutdown(); |
| 787 } | 783 } |
| 788 | |
| 789 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) | |
| 790 : original_profile_(profile) {} | |
| 791 | |
| 792 DerivedTestingProfile::~DerivedTestingProfile() {} | |
| 793 | |
| 794 ProfileId DerivedTestingProfile::GetRuntimeId() { | |
| 795 return original_profile_->GetRuntimeId(); | |
| 796 } | |
| OLD | NEW |