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

Side by Side Diff: chrome/browser/extensions/extension_settings_noop_storage.h

Issue 7189029: Implement an initial extension settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Make clang happy Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
(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 "base/compiler_specific.h"
10 #include "chrome/browser/extensions/extension_settings_storage.h"
11
12 // Implementation of ExtensionSettingsStorage which does nothing, but behaves
13 // as though each Get/Set were successful.
14 // Intended to be wrapped by a Cache for trivial in-memory storage.
15 class ExtensionSettingsNoopStorage : public ExtensionSettingsStorage {
16 public:
17 ExtensionSettingsNoopStorage() {}
18
19 virtual void DeleteSoon() OVERRIDE;
20 virtual void Get(const std::string& key, Callback* callback) OVERRIDE;
21 virtual void Get(const ListValue& keys, Callback* callback) OVERRIDE;
22 virtual void Get(Callback* callback) OVERRIDE;
23 virtual void Set(
24 const std::string& key, const Value& value, Callback* callback) OVERRIDE;
25 virtual void Set(const DictionaryValue& values, Callback* callback) OVERRIDE;
26 virtual void Remove(const std::string& key, Callback* callback) OVERRIDE;
27 virtual void Remove(const ListValue& keys, Callback* callback) OVERRIDE;
28 virtual void Clear(Callback *callback) OVERRIDE;
29
30 private:
31 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsNoopStorage);
32 };
33
34 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_NOOP_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698