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

Unified Diff: chrome/browser/extensions/settings/settings_namespace.cc

Issue 10784035: Refactored SettingsFrontend and forwarding of calls to the backends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment Created 8 years, 5 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/settings/settings_namespace.cc
diff --git a/chrome/browser/extensions/settings/settings_namespace.cc b/chrome/browser/extensions/settings/settings_namespace.cc
index 7340592468da90ee157d7b3831468f5d26225662..aa8c0070a9eceade80293ea69e5fd3ab3e3b3f88 100644
--- a/chrome/browser/extensions/settings/settings_namespace.cc
+++ b/chrome/browser/extensions/settings/settings_namespace.cc
@@ -11,25 +11,29 @@ namespace extensions {
namespace settings_namespace {
namespace {
-const char* kLocalNamespace = "local";
-const char* kSyncNamespace = "sync";
+const char kLocalNamespace[] = "local";
+const char kSyncNamespace[] = "sync";
+const char kManagedNamespace[] = "managed";
} // namespace
std::string ToString(Namespace settings_namespace) {
switch (settings_namespace) {
- case LOCAL: return kLocalNamespace;
- case SYNC: return kSyncNamespace;
- case INVALID:
- default: NOTREACHED();
+ case LOCAL: return kLocalNamespace;
+ case SYNC: return kSyncNamespace;
+ case MANAGED: return kManagedNamespace;
+ case INVALID: break;
}
+ NOTREACHED();
return std::string();
}
Namespace FromString(const std::string& namespace_string) {
if (namespace_string == kLocalNamespace)
return LOCAL;
- else if (namespace_string == kSyncNamespace)
+ if (namespace_string == kSyncNamespace)
return SYNC;
+ if (namespace_string == kManagedNamespace)
+ return MANAGED;
return INVALID;
}
« no previous file with comments | « chrome/browser/extensions/settings/settings_namespace.h ('k') | chrome/browser/extensions/settings/settings_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698