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

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

Issue 165223003: Add a Restore() method to ValueStore and make StorageAPI use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 10 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_POLICY_VALUE_STORE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_POLICY_VALUE_STORE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_POLICY_VALUE_STORE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_POLICY_VALUE_STORE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual ReadResult Get() OVERRIDE; 48 virtual ReadResult Get() OVERRIDE;
49 virtual WriteResult Set( 49 virtual WriteResult Set(
50 WriteOptions options, 50 WriteOptions options,
51 const std::string& key, 51 const std::string& key,
52 const base::Value& value) OVERRIDE; 52 const base::Value& value) OVERRIDE;
53 virtual WriteResult Set( 53 virtual WriteResult Set(
54 WriteOptions options, const base::DictionaryValue& values) OVERRIDE; 54 WriteOptions options, const base::DictionaryValue& values) OVERRIDE;
55 virtual WriteResult Remove(const std::string& key) OVERRIDE; 55 virtual WriteResult Remove(const std::string& key) OVERRIDE;
56 virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE; 56 virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE;
57 virtual WriteResult Clear() OVERRIDE; 57 virtual WriteResult Clear() OVERRIDE;
58 // Hopefully, as a Read-Only database, there is no reason to use these.
59 virtual bool Restore() OVERRIDE;
60 virtual bool RestoreKey(const std::string& key) OVERRIDE;
58 61
59 // For unit tests. 62 // For unit tests.
60 ValueStore* delegate() { return delegate_.get(); } 63 ValueStore* delegate() { return delegate_.get(); }
61 64
62 private: 65 private:
63 std::string extension_id_; 66 std::string extension_id_;
64 scoped_refptr<SettingsObserverList> observers_; 67 scoped_refptr<SettingsObserverList> observers_;
65 scoped_ptr<ValueStore> delegate_; 68 scoped_ptr<ValueStore> delegate_;
66 69
67 DISALLOW_COPY_AND_ASSIGN(PolicyValueStore); 70 DISALLOW_COPY_AND_ASSIGN(PolicyValueStore);
68 }; 71 };
69 72
70 } // namespace extensions 73 } // namespace extensions
71 74
72 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_POLICY_VALUE_STORE_H_ 75 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_POLICY_VALUE_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698