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

Side by Side Diff: chrome/browser/extensions/api/storage/settings_namespace.cc

Issue 11826048: Revert 176015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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) 2012 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 #include "chrome/browser/extensions/api/storage/settings_namespace.h"
6
7 #include "base/logging.h"
8
9 namespace extensions {
10
11 namespace settings_namespace {
12
13 namespace {
14 const char kLocalNamespace[] = "local";
15 const char kSyncNamespace[] = "sync";
16 const char kManagedNamespace[] = "managed";
17 } // namespace
18
19 std::string ToString(Namespace settings_namespace) {
20 switch (settings_namespace) {
21 case LOCAL: return kLocalNamespace;
22 case SYNC: return kSyncNamespace;
23 case MANAGED: return kManagedNamespace;
24 case INVALID: break;
25 }
26 NOTREACHED();
27 return std::string();
28 }
29
30 Namespace FromString(const std::string& namespace_string) {
31 if (namespace_string == kLocalNamespace)
32 return LOCAL;
33 if (namespace_string == kSyncNamespace)
34 return SYNC;
35 if (namespace_string == kManagedNamespace)
36 return MANAGED;
37 return INVALID;
38 }
39
40 } // namespace settings_namespace
41
42 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/storage/settings_namespace.h ('k') | chrome/browser/extensions/api/storage/settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698