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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 3c2a90fe73855fe22e192c9b6573a493bbd2f634..7aaf80224611343c88e763a5a36a8ae82c19ba84 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -817,6 +817,11 @@ if (!policy_service_) {
}
PrefService* TestingProfile::GetPrefs() {
+ return const_cast<PrefService*>(
+ static_cast<const TestingProfile*>(this)->GetPrefs());
sky 2015/02/05 17:00:58 Shouldn't this be const_cast here too? I would hav
Ilya Sherman 2015/02/05 21:24:58 You only need to const_cast in order to drop a con
+}
+
+const PrefService* TestingProfile::GetPrefs() const {
DCHECK(prefs_);
return prefs_.get();
}
« chrome/browser/ui/app_list/test/fake_profile.cc ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698