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_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual ReadResult Get() OVERRIDE; | 42 virtual ReadResult Get() OVERRIDE; |
43 virtual WriteResult Set( | 43 virtual WriteResult Set( |
44 WriteOptions options, | 44 WriteOptions options, |
45 const std::string& key, | 45 const std::string& key, |
46 const base::Value& value) OVERRIDE; | 46 const base::Value& value) OVERRIDE; |
47 virtual WriteResult Set( | 47 virtual WriteResult Set( |
48 WriteOptions options, const base::DictionaryValue& values) OVERRIDE; | 48 WriteOptions options, const base::DictionaryValue& values) OVERRIDE; |
49 virtual WriteResult Remove(const std::string& key) OVERRIDE; | 49 virtual WriteResult Remove(const std::string& key) OVERRIDE; |
50 virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE; | 50 virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE; |
51 virtual WriteResult Clear() OVERRIDE; | 51 virtual WriteResult Clear() OVERRIDE; |
| 52 virtual bool Restore() OVERRIDE; |
| 53 virtual bool RestoreKey(const std::string& key) OVERRIDE; |
52 | 54 |
53 // Sync-related methods, analogous to those on SyncableService (handled by | 55 // Sync-related methods, analogous to those on SyncableService (handled by |
54 // ExtensionSettings), but with looser guarantees about when the methods | 56 // ExtensionSettings), but with looser guarantees about when the methods |
55 // can be called. | 57 // can be called. |
56 | 58 |
57 // Must only be called if sync isn't already active. | 59 // Must only be called if sync isn't already active. |
58 syncer::SyncError StartSyncing( | 60 syncer::SyncError StartSyncing( |
59 const base::DictionaryValue& sync_state, | 61 const base::DictionaryValue& sync_state, |
60 scoped_ptr<SettingsSyncProcessor> sync_processor); | 62 scoped_ptr<SettingsSyncProcessor> sync_processor); |
61 | 63 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 110 |
109 const syncer::ModelType sync_type_; | 111 const syncer::ModelType sync_type_; |
110 const syncer::SyncableService::StartSyncFlare flare_; | 112 const syncer::SyncableService::StartSyncFlare flare_; |
111 | 113 |
112 DISALLOW_COPY_AND_ASSIGN(SyncableSettingsStorage); | 114 DISALLOW_COPY_AND_ASSIGN(SyncableSettingsStorage); |
113 }; | 115 }; |
114 | 116 |
115 } // namespace extensions | 117 } // namespace extensions |
116 | 118 |
117 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ | 119 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ |
OLD | NEW |