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; | |
54 | 52 |
55 // Sync-related methods, analogous to those on SyncableService (handled by | 53 // Sync-related methods, analogous to those on SyncableService (handled by |
56 // ExtensionSettings), but with looser guarantees about when the methods | 54 // ExtensionSettings), but with looser guarantees about when the methods |
57 // can be called. | 55 // can be called. |
58 | 56 |
59 // Must only be called if sync isn't already active. | 57 // Must only be called if sync isn't already active. |
60 syncer::SyncError StartSyncing( | 58 syncer::SyncError StartSyncing( |
61 const base::DictionaryValue& sync_state, | 59 const base::DictionaryValue& sync_state, |
62 scoped_ptr<SettingsSyncProcessor> sync_processor); | 60 scoped_ptr<SettingsSyncProcessor> sync_processor); |
63 | 61 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 108 |
111 const syncer::ModelType sync_type_; | 109 const syncer::ModelType sync_type_; |
112 const syncer::SyncableService::StartSyncFlare flare_; | 110 const syncer::SyncableService::StartSyncFlare flare_; |
113 | 111 |
114 DISALLOW_COPY_AND_ASSIGN(SyncableSettingsStorage); | 112 DISALLOW_COPY_AND_ASSIGN(SyncableSettingsStorage); |
115 }; | 113 }; |
116 | 114 |
117 } // namespace extensions | 115 } // namespace extensions |
118 | 116 |
119 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ | 117 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ |
OLD | NEW |