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

Unified Diff: chrome/browser/chromeos/policy/recommendation_restorer.h

Issue 136633005: Turn back spoken feedback setting into a system-wide (non-per-user) preference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/recommendation_restorer.h
diff --git a/chrome/browser/chromeos/policy/recommendation_restorer.h b/chrome/browser/chromeos/policy/recommendation_restorer.h
index 0f192dec8d28959abdd43338e18e5c64e145997f..d86211e48b4bf91a630b3a264f100f241566d621 100644
--- a/chrome/browser/chromeos/policy/recommendation_restorer.h
+++ b/chrome/browser/chromeos/policy/recommendation_restorer.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/prefs/pref_change_registrar.h"
+#include "base/prefs/pref_service.h"
#include "base/timer/timer.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/notification_observer.h"
@@ -49,17 +50,24 @@ class RecommendationRestorer : public BrowserContextKeyedService,
// |allow_delay| is |true| and the login screen is being shown, a timer is
// started that will clear the setting when the user becomes idle for one
// minute. Otherwise, the setting is cleared immediately.
- void Restore(bool allow_delay, const std::string& pref_name);
+ //
+ // RestoreGlobalPref for the global pref, RestoreUserPref for user pref.
+ void RestoreGlobalPref(bool allow_delay, const std::string& pref_name);
+ void RestoreUserPref(bool allow_delay, const std::string& pref_name);
private:
friend class RecommendationRestorerTest;
+ void RestorePrefInternal(bool allow_delay,
+ PrefService* pref,
+ const std::string& pref_name);
void RestoreAll();
void StartTimer();
void StopTimer();
PrefChangeRegistrar pref_change_registrar_;
+ PrefChangeRegistrar global_pref_change_registrar_;
content::NotificationRegistrar notification_registrar_;
bool logged_in_;

Powered by Google App Engine
This is Rietveld 408576698