OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_NOOP_STORAGE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_NOOP_STORAGE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/extensions/extension_settings_storage.h" |
| 10 |
| 11 // Implementation of ExtensionSettingsStorage which does nothing, but behaves |
| 12 // as though each Get/Set were successful. |
| 13 // Intended to be wrapped by a Cache for trivial in-memory storage. |
| 14 class ExtensionSettingsNoopStorage : public ExtensionSettingsStorage { |
| 15 public: |
| 16 ExtensionSettingsNoopStorage() {} |
| 17 ~ExtensionSettingsNoopStorage() {} |
| 18 |
| 19 int type() { return NOOP; } |
| 20 |
| 21 void Get(const std::string& key, Callback* callback); |
| 22 void Get(const ListValue& keys, Callback* callback); |
| 23 void Get(Callback* callback); |
| 24 void Set(const std::string& key, const Value& value, Callback* callback); |
| 25 void Set(const DictionaryValue& values, Callback* callback); |
| 26 void Remove(const std::string& key, Callback* callback); |
| 27 void Remove(const ListValue& keys, Callback* callback); |
| 28 void Clear(Callback *callback); |
| 29 }; |
| 30 |
| 31 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_NOOP_STORAGE_H_ |
OLD | NEW |