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

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: Add missing files Created 9 years, 6 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 "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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698