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

Side by Side Diff: chrome/browser/protector/protector_service.h

Issue 10170046: [protector] Bump Preferences backup version to 3 to mitigate the startup prefs migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_H_ 5 #ifndef CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_H_
6 #define CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_H_ 6 #define CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual void DiscardChange(BaseSettingChange* change, Browser* browser); 55 virtual void DiscardChange(BaseSettingChange* change, Browser* browser);
56 56
57 // Opens a tab with specified URL in the browser window we've shown error 57 // Opens a tab with specified URL in the browser window we've shown error
58 // bubble for. 58 // bubble for.
59 virtual void OpenTab(const GURL& url, Browser* browser); 59 virtual void OpenTab(const GURL& url, Browser* browser);
60 60
61 // Returns the ProtectedPrefsWatcher instance for access to protected prefs 61 // Returns the ProtectedPrefsWatcher instance for access to protected prefs
62 // backup. 62 // backup.
63 ProtectedPrefsWatcher* GetPrefsWatcher(); 63 ProtectedPrefsWatcher* GetPrefsWatcher();
64 64
65 // Stops observing pref changes and updating the backup. Should be used in
66 // tests only.
67 void StopWatchingPrefsForTesting();
68
65 // Returns the most recent change instance or NULL if there are no changes. 69 // Returns the most recent change instance or NULL if there are no changes.
66 BaseSettingChange* GetLastChange(); 70 BaseSettingChange* GetLastChange();
67 71
68 // Returns the Profile instance for this service. 72 // Returns the Profile instance for this service.
69 Profile* profile() { return profile_; } 73 Profile* profile() { return profile_; }
70 74
71 private: 75 private:
72 friend class ProtectorServiceTest; 76 friend class ProtectorServiceTest;
73 77
74 // Each item consists of an error and corresponding change instance. 78 // Each item consists of an error and corresponding change instance.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 144
141 // Observes changes to protected prefs and updates the backup. 145 // Observes changes to protected prefs and updates the backup.
142 scoped_ptr<ProtectedPrefsWatcher> prefs_watcher_; 146 scoped_ptr<ProtectedPrefsWatcher> prefs_watcher_;
143 147
144 DISALLOW_COPY_AND_ASSIGN(ProtectorService); 148 DISALLOW_COPY_AND_ASSIGN(ProtectorService);
145 }; 149 };
146 150
147 } // namespace protector 151 } // namespace protector
148 152
149 #endif // CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_H_ 153 #endif // CHROME_BROWSER_PROTECTOR_PROTECTOR_SERVICE_H_
OLDNEW
« 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