Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / android / preferences / pref_service_bridge.h
blob656a0fece0d6ceaf990dffe96279d0912284badf
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 CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_
8 #include <jni.h>
9 #include <string>
11 #include "components/content_settings/core/common/content_settings.h"
13 class PrefServiceBridge {
14 public:
15 static bool RegisterPrefServiceBridge(JNIEnv* env);
17 // Use |locale| to create a language-region pair and language code to prepend
18 // to the default accept languages. For Malay, we'll end up creating
19 // "ms-MY,ms,en-US,en", and for Swiss-German, we will have
20 // "de-CH,de-DE,de,en-US,en".
21 static void PrependToAcceptLanguagesIfNecessary(
22 const std::string& locale,
23 std::string* accept_languages);
25 // Return the corresponding Android permission associated with the
26 // ContentSettingsType specified (or an empty string if no permission exists).
27 static std::string GetAndroidPermissionForContentSetting(
28 ContentSettingsType content_type);
31 #endif // CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_