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

Side by Side Diff: chrome/browser/extensions/api/storage/syncable_settings_storage.h

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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_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 13 matching lines...) Expand all
24 class SyncableSettingsStorage : public ValueStore { 24 class SyncableSettingsStorage : public ValueStore {
25 public: 25 public:
26 SyncableSettingsStorage( 26 SyncableSettingsStorage(
27 const scoped_refptr<SettingsObserverList>& observers, 27 const scoped_refptr<SettingsObserverList>& observers,
28 const std::string& extension_id, 28 const std::string& extension_id,
29 // Ownership taken. 29 // Ownership taken.
30 ValueStore* delegate, 30 ValueStore* delegate,
31 syncer::ModelType sync_type, 31 syncer::ModelType sync_type,
32 const syncer::SyncableService::StartSyncFlare& flare); 32 const syncer::SyncableService::StartSyncFlare& flare);
33 33
34 virtual ~SyncableSettingsStorage(); 34 ~SyncableSettingsStorage() override;
35 35
36 // ValueStore implementation. 36 // ValueStore implementation.
37 virtual size_t GetBytesInUse(const std::string& key) override; 37 size_t GetBytesInUse(const std::string& key) override;
38 virtual size_t GetBytesInUse(const std::vector<std::string>& keys) override; 38 size_t GetBytesInUse(const std::vector<std::string>& keys) override;
39 virtual size_t GetBytesInUse() override; 39 size_t GetBytesInUse() override;
40 virtual ReadResult Get(const std::string& key) override; 40 ReadResult Get(const std::string& key) override;
41 virtual ReadResult Get(const std::vector<std::string>& keys) override; 41 ReadResult Get(const std::vector<std::string>& keys) override;
42 virtual ReadResult Get() override; 42 ReadResult Get() override;
43 virtual WriteResult Set( 43 WriteResult Set(WriteOptions options,
44 WriteOptions options, 44 const std::string& key,
45 const std::string& key, 45 const base::Value& value) override;
46 const base::Value& value) override; 46 WriteResult Set(WriteOptions options,
47 virtual WriteResult Set( 47 const base::DictionaryValue& values) override;
48 WriteOptions options, const base::DictionaryValue& values) override; 48 WriteResult Remove(const std::string& key) override;
49 virtual WriteResult Remove(const std::string& key) override; 49 WriteResult Remove(const std::vector<std::string>& keys) override;
50 virtual WriteResult Remove(const std::vector<std::string>& keys) override; 50 WriteResult Clear() override;
51 virtual WriteResult Clear() override; 51 bool Restore() override;
52 virtual bool Restore() override; 52 bool RestoreKey(const std::string& key) override;
53 virtual bool RestoreKey(const std::string& key) override;
54 53
55 // Sync-related methods, analogous to those on SyncableService (handled by 54 // Sync-related methods, analogous to those on SyncableService (handled by
56 // ExtensionSettings), but with looser guarantees about when the methods 55 // ExtensionSettings), but with looser guarantees about when the methods
57 // can be called. 56 // can be called.
58 57
59 // Must only be called if sync isn't already active. 58 // Must only be called if sync isn't already active.
60 syncer::SyncError StartSyncing( 59 syncer::SyncError StartSyncing(
61 const base::DictionaryValue& sync_state, 60 const base::DictionaryValue& sync_state,
62 scoped_ptr<SettingsSyncProcessor> sync_processor); 61 scoped_ptr<SettingsSyncProcessor> sync_processor);
63 62
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 109
111 const syncer::ModelType sync_type_; 110 const syncer::ModelType sync_type_;
112 const syncer::SyncableService::StartSyncFlare flare_; 111 const syncer::SyncableService::StartSyncFlare flare_;
113 112
114 DISALLOW_COPY_AND_ASSIGN(SyncableSettingsStorage); 113 DISALLOW_COPY_AND_ASSIGN(SyncableSettingsStorage);
115 }; 114 };
116 115
117 } // namespace extensions 116 } // namespace extensions
118 117
119 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_ 118 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNCABLE_SETTINGS_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698