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

Side by Side Diff: chrome/browser/extensions/api/storage/settings_test_util.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_SETTINGS_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 explicit ScopedSettingsStorageFactory( 96 explicit ScopedSettingsStorageFactory(
97 const scoped_refptr<SettingsStorageFactory>& delegate); 97 const scoped_refptr<SettingsStorageFactory>& delegate);
98 98
99 // Sets the delegate factory (equivalent to scoped_ptr::reset). 99 // Sets the delegate factory (equivalent to scoped_ptr::reset).
100 void Reset(const scoped_refptr<SettingsStorageFactory>& delegate); 100 void Reset(const scoped_refptr<SettingsStorageFactory>& delegate);
101 101
102 // SettingsStorageFactory implementation. 102 // SettingsStorageFactory implementation.
103 virtual ValueStore* Create(const base::FilePath& base_path, 103 virtual ValueStore* Create(const base::FilePath& base_path,
104 const std::string& extension_id) OVERRIDE; 104 const std::string& extension_id) OVERRIDE;
105 virtual void DeleteDatabaseIfExists(
106 const base::FilePath& base_path,
107 const std::string& extension_id) OVERRIDE;
105 108
106 private: 109 private:
107 // SettingsStorageFactory is refcounted. 110 // SettingsStorageFactory is refcounted.
108 virtual ~ScopedSettingsStorageFactory(); 111 virtual ~ScopedSettingsStorageFactory();
109 112
110 scoped_refptr<SettingsStorageFactory> delegate_; 113 scoped_refptr<SettingsStorageFactory> delegate_;
111 }; 114 };
112 115
113 } // namespace settings_test_util 116 } // namespace settings_test_util
114 117
115 } // namespace extensions 118 } // namespace extensions
116 119
117 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_ 120 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698