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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 return NULL; | 553 return NULL; |
554 return GetRequestContext()->GetURLRequestContext()->cookie_store()-> | 554 return GetRequestContext()->GetURLRequestContext()->cookie_store()-> |
555 GetCookieMonster(); | 555 GetCookieMonster(); |
556 } | 556 } |
557 | 557 |
558 void TestingProfile::CreateTestingPrefService() { | 558 void TestingProfile::CreateTestingPrefService() { |
559 DCHECK(!prefs_.get()); | 559 DCHECK(!prefs_.get()); |
560 testing_prefs_ = new TestingPrefServiceSyncable(); | 560 testing_prefs_ = new TestingPrefServiceSyncable(); |
561 prefs_.reset(testing_prefs_); | 561 prefs_.reset(testing_prefs_); |
562 user_prefs::UserPrefs::Set(this, prefs_.get()); | 562 user_prefs::UserPrefs::Set(this, prefs_.get()); |
563 chrome::RegisterUserPrefs(testing_prefs_->registry()); | 563 chrome::RegisterUserProfilePrefs(testing_prefs_->registry()); |
564 } | 564 } |
565 | 565 |
566 void TestingProfile::CreateProfilePolicyConnector() { | 566 void TestingProfile::CreateProfilePolicyConnector() { |
567 scoped_ptr<policy::PolicyService> service; | 567 scoped_ptr<policy::PolicyService> service; |
568 #if defined(ENABLE_CONFIGURATION_POLICY) | 568 #if defined(ENABLE_CONFIGURATION_POLICY) |
569 std::vector<policy::ConfigurationPolicyProvider*> providers; | 569 std::vector<policy::ConfigurationPolicyProvider*> providers; |
570 service.reset(new policy::PolicyServiceImpl(providers)); | 570 service.reset(new policy::PolicyServiceImpl(providers)); |
571 #else | 571 #else |
572 service.reset(new policy::PolicyServiceStub()); | 572 service.reset(new policy::PolicyServiceStub()); |
573 #endif | 573 #endif |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 | 807 |
808 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 808 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
809 DCHECK(!build_called_); | 809 DCHECK(!build_called_); |
810 build_called_ = true; | 810 build_called_ = true; |
811 return scoped_ptr<TestingProfile>(new TestingProfile( | 811 return scoped_ptr<TestingProfile>(new TestingProfile( |
812 path_, | 812 path_, |
813 delegate_, | 813 delegate_, |
814 extension_policy_, | 814 extension_policy_, |
815 pref_service_.Pass())); | 815 pref_service_.Pass())); |
816 } | 816 } |
OLD | NEW |