| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |