| 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_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 Loading... |
| 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; | |
| 108 | 105 |
| 109 private: | 106 private: |
| 110 // SettingsStorageFactory is refcounted. | 107 // SettingsStorageFactory is refcounted. |
| 111 virtual ~ScopedSettingsStorageFactory(); | 108 virtual ~ScopedSettingsStorageFactory(); |
| 112 | 109 |
| 113 scoped_refptr<SettingsStorageFactory> delegate_; | 110 scoped_refptr<SettingsStorageFactory> delegate_; |
| 114 }; | 111 }; |
| 115 | 112 |
| 116 } // namespace settings_test_util | 113 } // namespace settings_test_util |
| 117 | 114 |
| 118 } // namespace extensions | 115 } // namespace extensions |
| 119 | 116 |
| 120 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_ | 117 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_TEST_UTIL_H_ |
| OLD | NEW |