Chromium Code Reviews| Index: chrome/browser/extensions/extension_pref_store.h |
| diff --git a/chrome/browser/extensions/extension_pref_store.h b/chrome/browser/extensions/extension_pref_store.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..be07b5c3f4c7907689bbc76c54467187ee7cab5d |
| --- /dev/null |
| +++ b/chrome/browser/extensions/extension_pref_store.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_STORE_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_STORE_H_ |
| +#pragma once |
| + |
| +#include "chrome/browser/prefs/value_map_pref_store.h" |
| + |
| +// A PrefStore implementation that holds preferences set by extensions. |
| +class ExtensionPrefStore : public ValueMapPrefStore { |
| + public: |
| + ExtensionPrefStore(); |
| + virtual ~ExtensionPrefStore() {} |
| + |
| + // Set an extension preference |value| for |key|. Takes ownership of |value|. |
|
battre (please use the other)
2010/12/08 12:24:15
Does passing value=NULL have the connotation of a
Mattias Nissler (ping if slow)
2010/12/09 10:20:20
No. Actually, it DCHECKs.
|
| + void SetExtensionPref(const std::string& key, Value* value); |
| + |
| + // Remove the extension preference value for |key|. |
| + void RemoveExtensionPref(const std::string& key); |
| + |
| + // Tell the store it's now fully initialized. |
| + void OnInitializationCompleted(); |
| + |
| + private: |
| + // PrefStore overrides: |
| + virtual bool IsInitializationComplete(); |
|
danno
2010/12/08 13:08:45
should this guy be const? (superclass def, too)
Mattias Nissler (ping if slow)
2010/12/09 10:20:20
Done.
|
| + |
| + bool initialization_complete_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionPrefStore); |
| +}; |
| + |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_STORE_H_ |