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

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

Issue 6484033: Fix a bug that caused Chrome OS system preferences not to work in the guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rework again! Created 9 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
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile.cc
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 2f1fb975c321ff075dc5aa1e1d3d9108254bcd7e..2da8b5cb08c7e200add6f392e0ec195af119f122 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -57,6 +57,8 @@
#include "chrome/browser/password_manager/native_backend_gnome_x.h"
#include "chrome/browser/password_manager/native_backend_kwallet_x.h"
#include "chrome/browser/password_manager/password_store_x.h"
+#elif defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/preferences.h"
#endif
using base::Time;
@@ -591,6 +593,11 @@ class OffTheRecordProfileImpl : public Profile,
virtual void SetupChromeOSEnterpriseExtensionObserver() {
profile_->SetupChromeOSEnterpriseExtensionObserver();
}
+
+ virtual void InitChromeOSPreferences() {
+ // The off-the-record profile shouldn't have Chrome OS's preferences.
+ // The preferences are associated with the regular user profile.
+ }
#endif // defined(OS_CHROMEOS)
virtual void ExitedOffTheRecordMode() {
@@ -743,6 +750,15 @@ class GuestSessionProfile : public OffTheRecordProfileImpl {
virtual PersonalDataManager* GetPersonalDataManager() {
return GetOriginalProfile()->GetPersonalDataManager();
}
+
+ virtual void InitChromeOSPreferences() {
+ chromeos_preferences_.reset(new chromeos::Preferences());
+ chromeos_preferences_->Init(GetPrefs());
+ }
+
+ private:
+ // The guest user should be able to customize Chrome OS preferences.
+ scoped_ptr<chromeos::Preferences> chromeos_preferences_;
};
#endif
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698