[Android WebView] Delay destroy until DetachFromWindow
[chromium-blink-merge.git] / extensions / browser / pref_names.cc
blob56de3397d9b25472df9af5c6aa7533d5e39a4b17
1 // Copyright 2013 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 #include "extensions/browser/pref_names.h"
7 #include "base/logging.h"
9 namespace extensions {
10 namespace pref_names {
12 bool ScopeToPrefName(ExtensionPrefsScope scope, std::string* result) {
13 switch (scope) {
14 case kExtensionPrefsScopeRegular:
15 *result = kPrefPreferences;
16 return true;
17 case kExtensionPrefsScopeRegularOnly:
18 *result = kPrefRegularOnlyPreferences;
19 return true;
20 case kExtensionPrefsScopeIncognitoPersistent:
21 *result = kPrefIncognitoPreferences;
22 return true;
23 case kExtensionPrefsScopeIncognitoSessionOnly:
24 return false;
26 NOTREACHED();
27 return false;
30 const char kPrefPreferences[] = "preferences";
31 const char kPrefIncognitoPreferences[] = "incognito_preferences";
32 const char kPrefRegularOnlyPreferences[] = "regular_only_preferences";
33 const char kPrefContentSettings[] = "content_settings";
34 const char kPrefIncognitoContentSettings[] = "incognito_content_settings";
36 } // namespace pref_names
37 } // namespace extensions