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

Unified Diff: chrome/browser/protector/protector_service.h

Issue 9620010: Added Protector backup for Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload Created 8 years, 9 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/protector/protector_service.h
diff --git a/chrome/browser/protector/protector_service.h b/chrome/browser/protector/protector_service.h
index 942e567db52b31385536010f0f4089a8fde37b78..59ce7f0dfc3802db427f850ad660a3a942482123 100644
--- a/chrome/browser/protector/protector_service.h
+++ b/chrome/browser/protector/protector_service.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop_helpers.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/protector/base_setting_change.h"
@@ -23,6 +24,7 @@ class TemplateURLService;
namespace protector {
+class ProtectedPrefsWatcher;
class SettingsChangeGlobalError;
// Presents a SettingChange to user and handles possible user actions.
@@ -56,6 +58,10 @@ class ProtectorService : public ProfileKeyedService,
// bubble for.
virtual void OpenTab(const GURL& url, Browser* browser);
+ // Returns the ProtectedPrefsWatcher instance for access to protected prefs
+ // backup.
+ ProtectedPrefsWatcher* GetPrefsWatcher();
+
// Returns the most recent change instance or NULL if there are no changes.
BaseSettingChange* GetLastChange();
@@ -65,7 +71,8 @@ class ProtectorService : public ProfileKeyedService,
private:
friend class ProtectorServiceTest;
- // Pair of error and corresponding change instance.
+ // Pair of error and corresponding change instance. linked_ptr is used because
+ // Item instances are stored in a std::vector and must be copyable.
struct Item {
Item();
~Item();
@@ -117,6 +124,9 @@ class ProtectorService : public ProfileKeyedService,
// discarded by user.
bool has_active_change_;
+ // Observes changes to protected prefs and updates the backup.
+ scoped_ptr<ProtectedPrefsWatcher> prefs_watcher_;
+
DISALLOW_COPY_AND_ASSIGN(ProtectorService);
};
« no previous file with comments | « chrome/browser/protector/protected_prefs_watcher_unittest.cc ('k') | chrome/browser/protector/protector_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698