| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 786 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
| 791 return GetExtensionSpecialStoragePolicy(); | 787 return GetExtensionSpecialStoragePolicy(); |
| 792 } | 788 } |
| 793 | 789 |
| 794 void TestingProfile::DestroyWebDataService() { | 790 void TestingProfile::DestroyWebDataService() { |
| 795 if (!web_data_service_.get()) | 791 if (!web_data_service_.get()) |
| 796 return; | 792 return; |
| 797 | 793 |
| 798 web_data_service_->Shutdown(); | 794 web_data_service_->Shutdown(); |
| 799 } | 795 } |
| 800 | |
| 801 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) | |
| 802 : original_profile_(profile) {} | |
| 803 | |
| 804 DerivedTestingProfile::~DerivedTestingProfile() {} | |
| 805 | |
| 806 ProfileId DerivedTestingProfile::GetRuntimeId() { | |
| 807 return original_profile_->GetRuntimeId(); | |
| 808 } | |
| OLD | NEW |