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

Unified Diff: chrome/browser/extensions/api/storage/settings_namespace.h

Issue 181233011: Revert of Add ExtensionsApiClient interface, use it in the storage API SettingsFrontend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/storage/settings_namespace.h
diff --git a/chrome/browser/extensions/api/storage/settings_namespace.h b/chrome/browser/extensions/api/storage/settings_namespace.h
new file mode 100644
index 0000000000000000000000000000000000000000..1047b45353340b3cb448c9227ba70813c977b6c5
--- /dev/null
+++ b/chrome/browser/extensions/api/storage/settings_namespace.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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_API_STORAGE_SETTINGS_NAMESPACE_H_
+#define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_NAMESPACE_H_
+
+#include <string>
+
+namespace extensions {
+
+namespace settings_namespace {
+
+// The namespaces of the storage areas.
+enum Namespace {
+ LOCAL, // "local" i.e. chrome.storage.local
+ SYNC, // "sync" i.e. chrome.storage.sync
+ MANAGED, // "managed" i.e. chrome.storage.managed
+ INVALID
+};
+
+// Converts a namespace to its string representation.
+// Namespace must not be INVALID.
+std::string ToString(Namespace settings_namespace);
+
+// Converts a string representation of a namespace to its namespace, or INVALID
+// if the string doesn't map to one.
+Namespace FromString(const std::string& ns_string);
+
+} // namespace settings_namespace
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_NAMESPACE_H_

Powered by Google App Engine
This is Rietveld 408576698