Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 1613473002: Replace TestingProfile::GetCookieMonster with GetCookieStore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed some stuff Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 TestingProfile::GetExtensionSpecialStoragePolicy() { 728 TestingProfile::GetExtensionSpecialStoragePolicy() {
729 #if defined(ENABLE_EXTENSIONS) 729 #if defined(ENABLE_EXTENSIONS)
730 if (!extension_special_storage_policy_.get()) 730 if (!extension_special_storage_policy_.get())
731 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(NULL); 731 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(NULL);
732 return extension_special_storage_policy_.get(); 732 return extension_special_storage_policy_.get();
733 #else 733 #else
734 return NULL; 734 return NULL;
735 #endif 735 #endif
736 } 736 }
737 737
738 net::CookieMonster* TestingProfile::GetCookieMonster() { 738 net::CookieStore* TestingProfile::GetCookieStore() {
739 if (!GetRequestContext()) 739 if (!GetRequestContext())
740 return NULL; 740 return NULL;
741 return GetRequestContext()->GetURLRequestContext()->cookie_store()-> 741 return GetRequestContext()->GetURLRequestContext()->cookie_store();
742 GetCookieMonster();
743 } 742 }
744 743
745 void TestingProfile::CreateTestingPrefService() { 744 void TestingProfile::CreateTestingPrefService() {
746 DCHECK(!prefs_.get()); 745 DCHECK(!prefs_.get());
747 testing_prefs_ = new syncable_prefs::TestingPrefServiceSyncable(); 746 testing_prefs_ = new syncable_prefs::TestingPrefServiceSyncable();
748 prefs_.reset(testing_prefs_); 747 prefs_.reset(testing_prefs_);
749 user_prefs::UserPrefs::Set(this, prefs_.get()); 748 user_prefs::UserPrefs::Set(this, prefs_.get());
750 chrome::RegisterUserProfilePrefs(testing_prefs_->registry()); 749 chrome::RegisterUserProfilePrefs(testing_prefs_->registry());
751 } 750 }
752 751
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 1048
1050 // Note: Owned by |original_profile|. 1049 // Note: Owned by |original_profile|.
1051 return new TestingProfile(path_, delegate_, 1050 return new TestingProfile(path_, delegate_,
1052 #if defined(ENABLE_EXTENSIONS) 1051 #if defined(ENABLE_EXTENSIONS)
1053 extension_policy_, 1052 extension_policy_,
1054 #endif 1053 #endif
1055 std::move(pref_service_), original_profile, 1054 std::move(pref_service_), original_profile,
1056 guest_session_, supervised_user_id_, 1055 guest_session_, supervised_user_id_,
1057 std::move(policy_service_), testing_factories_); 1056 std::move(policy_service_), testing_factories_);
1058 } 1057 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698