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_
11 #include "components/content_settings/core/common/content_settings.h"
13 class PrefServiceBridge
{
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_