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

Unified Diff: chrome/browser/extensions/settings/failing_settings_storage.h

Issue 8497065: Extension Settings API: make it so that when leveldb storage areas fail to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/settings/failing_settings_storage.h
diff --git a/chrome/browser/extensions/settings/failing_settings_storage.h b/chrome/browser/extensions/settings/failing_settings_storage.h
new file mode 100644
index 0000000000000000000000000000000000000000..db5c8c324bc6a694faeb76bedc160b8a65e1cf7e
--- /dev/null
+++ b/chrome/browser/extensions/settings/failing_settings_storage.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2011 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_SETTINGS_FAILING_SETTINGS_STORAGE_H_
+#define CHROME_BROWSER_EXTENSIONS_SETTINGS_FAILING_SETTINGS_STORAGE_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/extensions/settings/settings_storage.h"
+
+namespace extensions {
+
+// Settings storage area which fails every request.
+class FailingSettingsStorage : public SettingsStorage {
+ public:
+ FailingSettingsStorage() {}
+
+ // SettingsStorage implementation.
+ virtual ReadResult Get(const std::string& key) OVERRIDE;
+ virtual ReadResult Get(const std::vector<std::string>& keys) OVERRIDE;
+ virtual ReadResult Get() OVERRIDE;
+ virtual WriteResult Set(const std::string& key, const Value& value) OVERRIDE;
+ virtual WriteResult Set(const DictionaryValue& values) OVERRIDE;
+ virtual WriteResult Remove(const std::string& key) OVERRIDE;
+ virtual WriteResult Remove(const std::vector<std::string>& keys) OVERRIDE;
+ virtual WriteResult Clear() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FailingSettingsStorage);
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_FAILING_SETTINGS_STORAGE_H_
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/settings/failing_settings_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698