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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 } | 494 } |
495 | 495 |
496 void TestingProfile::SetOffTheRecordProfile(Profile* profile) { | 496 void TestingProfile::SetOffTheRecordProfile(Profile* profile) { |
497 incognito_profile_.reset(profile); | 497 incognito_profile_.reset(profile); |
498 } | 498 } |
499 | 499 |
500 Profile* TestingProfile::GetOffTheRecordProfile() { | 500 Profile* TestingProfile::GetOffTheRecordProfile() { |
501 return incognito_profile_.get(); | 501 return incognito_profile_.get(); |
502 } | 502 } |
503 | 503 |
504 GAIAInfoUpdateService* TestingProfile::GetGAIAInfoUpdateService() { | |
505 return NULL; | |
506 } | |
507 | |
508 bool TestingProfile::HasOffTheRecordProfile() { | 504 bool TestingProfile::HasOffTheRecordProfile() { |
509 return incognito_profile_.get() != NULL; | 505 return incognito_profile_.get() != NULL; |
510 } | 506 } |
511 | 507 |
512 Profile* TestingProfile::GetOriginalProfile() { | 508 Profile* TestingProfile::GetOriginalProfile() { |
513 return this; | 509 return this; |
514 } | 510 } |
515 | 511 |
516 ExtensionService* TestingProfile::GetExtensionService() { | 512 ExtensionService* TestingProfile::GetExtensionService() { |
517 return extensions::ExtensionSystem::Get(this)->extension_service(); | 513 return extensions::ExtensionSystem::Get(this)->extension_service(); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 | 796 |
801 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 797 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
802 DCHECK(!build_called_); | 798 DCHECK(!build_called_); |
803 build_called_ = true; | 799 build_called_ = true; |
804 return scoped_ptr<TestingProfile>(new TestingProfile( | 800 return scoped_ptr<TestingProfile>(new TestingProfile( |
805 path_, | 801 path_, |
806 delegate_, | 802 delegate_, |
807 extension_policy_, | 803 extension_policy_, |
808 pref_service_.Pass())); | 804 pref_service_.Pass())); |
809 } | 805 } |
OLD | NEW |