Update path of checkdeps to buildtools checkout
[chromium-blink-merge.git] / extensions / browser / api / storage / settings_namespace.h
blobe32612b96c02d2a7a84fd8ce374f5cb85f0fb722
1 // Copyright 2014 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.
5 #ifndef EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_NAMESPACE_H_
6 #define EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_NAMESPACE_H_
8 #include <string>
10 namespace extensions {
12 namespace settings_namespace {
14 // The namespaces of the storage areas.
15 enum Namespace {
16 LOCAL, // "local" i.e. chrome.storage.local
17 SYNC, // "sync" i.e. chrome.storage.sync
18 MANAGED, // "managed" i.e. chrome.storage.managed
19 INVALID
22 // Converts a namespace to its string representation.
23 // Namespace must not be INVALID.
24 std::string ToString(Namespace settings_namespace);
26 // Converts a string representation of a namespace to its namespace, or INVALID
27 // if the string doesn't map to one.
28 Namespace FromString(const std::string& ns_string);
30 } // namespace settings_namespace
32 } // namespace extensions
34 #endif // EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_NAMESPACE_H_