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

Unified Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 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/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index e275bafffa8b50ab1d7a9a6eba0ecef7d890add8..7baff3ec3ebcfce1983267f805851762f60f67c1 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -32,7 +32,7 @@
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
-#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
@@ -83,7 +83,7 @@ void NotifyOTRProfileDestroyedOnIOThread(void* original_profile,
OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile)
: profile_(real_profile),
- prefs_(real_profile->GetOffTheRecordPrefs()),
+ prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)),
ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)),
start_time_(Time::Now()),
zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged,
@@ -240,11 +240,11 @@ policy::PolicyService* OffTheRecordProfileImpl::GetPolicyService() {
return profile_->GetPolicyService();
}
-PrefServiceSyncable* OffTheRecordProfileImpl::GetPrefs() {
+PrefService* OffTheRecordProfileImpl::GetPrefs() {
return prefs_;
}
-PrefServiceSyncable* OffTheRecordProfileImpl::GetOffTheRecordPrefs() {
+PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() {
return prefs_;
}
@@ -470,7 +470,7 @@ class GuestSessionProfile : public OffTheRecordProfileImpl {
virtual void InitChromeOSPreferences() OVERRIDE {
chromeos_preferences_.reset(new chromeos::Preferences());
- chromeos_preferences_->Init(GetPrefs());
+ chromeos_preferences_->Init(static_cast<PrefServiceSyncable*>(GetPrefs()));
}
private:
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/off_the_record_profile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698