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

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

Issue 898003002: [Cleanup] Const-correct the profile() method for the EasyUnlockService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 TestingPrefServiceSyncable* TestingProfile::GetTestingPrefService() { 689 TestingPrefServiceSyncable* TestingProfile::GetTestingPrefService() {
690 DCHECK(prefs_); 690 DCHECK(prefs_);
691 DCHECK(testing_prefs_); 691 DCHECK(testing_prefs_);
692 return testing_prefs_; 692 return testing_prefs_;
693 } 693 }
694 694
695 TestingProfile* TestingProfile::AsTestingProfile() { 695 TestingProfile* TestingProfile::AsTestingProfile() {
696 return this; 696 return this;
697 } 697 }
698 698
699 std::string TestingProfile::GetProfileUserName() { 699 std::string TestingProfile::GetProfileUserName() const {
700 return profile_name_; 700 return profile_name_;
701 } 701 }
702 702
703 Profile::ProfileType TestingProfile::GetProfileType() const { 703 Profile::ProfileType TestingProfile::GetProfileType() const {
704 if (guest_session_) 704 if (guest_session_)
705 return GUEST_PROFILE; 705 return GUEST_PROFILE;
706 if (force_incognito_ || original_profile_) 706 if (force_incognito_ || original_profile_)
707 return INCOGNITO_PROFILE; 707 return INCOGNITO_PROFILE;
708 return REGULAR_PROFILE; 708 return REGULAR_PROFILE;
709 } 709 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 this, profile_policy_connector_.get()); 817 this, profile_policy_connector_.get());
818 CHECK_EQ(profile_policy_connector_.get(), 818 CHECK_EQ(profile_policy_connector_.get(),
819 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(this)); 819 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(this));
820 } 820 }
821 821
822 PrefService* TestingProfile::GetPrefs() { 822 PrefService* TestingProfile::GetPrefs() {
823 DCHECK(prefs_); 823 DCHECK(prefs_);
824 return prefs_.get(); 824 return prefs_.get();
825 } 825 }
826 826
827 const PrefService* TestingProfile::GetPrefs() const {
828 DCHECK(prefs_);
829 return prefs_.get();
830 }
831
827 DownloadManagerDelegate* TestingProfile::GetDownloadManagerDelegate() { 832 DownloadManagerDelegate* TestingProfile::GetDownloadManagerDelegate() {
828 return NULL; 833 return NULL;
829 } 834 }
830 835
831 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { 836 net::URLRequestContextGetter* TestingProfile::GetRequestContext() {
832 return GetDefaultStoragePartition(this)->GetURLRequestContext(); 837 return GetDefaultStoragePartition(this)->GetURLRequestContext();
833 } 838 }
834 839
835 net::URLRequestContextGetter* TestingProfile::CreateRequestContext( 840 net::URLRequestContextGetter* TestingProfile::CreateRequestContext(
836 content::ProtocolHandlerMap* protocol_handlers, 841 content::ProtocolHandlerMap* protocol_handlers,
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 #if defined(ENABLE_EXTENSIONS) 1091 #if defined(ENABLE_EXTENSIONS)
1087 extension_policy_, 1092 extension_policy_,
1088 #endif 1093 #endif
1089 pref_service_.Pass(), 1094 pref_service_.Pass(),
1090 original_profile, 1095 original_profile,
1091 guest_session_, 1096 guest_session_,
1092 supervised_user_id_, 1097 supervised_user_id_,
1093 policy_service_.Pass(), 1098 policy_service_.Pass(),
1094 testing_factories_); 1099 testing_factories_);
1095 } 1100 }
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