OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_ |
6 #define CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "components/content_settings/core/common/content_settings.h" | 11 #include "components/content_settings/core/common/content_settings.h" |
12 | 12 |
13 class PrefServiceBridge { | 13 class PrefServiceBridge { |
14 public: | 14 public: |
15 static bool RegisterPrefServiceBridge(JNIEnv* env); | 15 static bool RegisterPrefServiceBridge(JNIEnv* env); |
16 | 16 |
17 // Use |locale| to create a language-region pair and language code to prepend | 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 | 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 | 19 // "ms-MY,ms,en-US,en", and for Swiss-German, we will have |
20 // "de-CH,de-DE,de,en-US,en". | 20 // "de-CH,de-DE,de,en-US,en". |
21 static void PrependToAcceptLanguagesIfNecessary( | 21 static void PrependToAcceptLanguagesIfNecessary( |
22 const std::string& locale, | 22 const std::string& locale, |
23 std::string* accept_languages); | 23 std::string* accept_languages); |
24 | 24 |
25 // Return the corresponding Android permission associated with the | 25 // Return the corresponding Android permission associated with the |
26 // ContentSettingsType specified (or an empty string if no permission exists). | 26 // ContentSettingsType specified (or an empty string if no permission exists). |
27 static std::string GetAndroidPermissionForContentSetting( | 27 static std::string GetAndroidPermissionForContentSetting( |
28 ContentSettingsType content_type); | 28 ContentSettingsType content_type); |
| 29 |
| 30 // Return the first run seed data pulled from the Java side of application. |
| 31 static void GetVariationsFirstRunSeed(std::string* seed_data, |
| 32 std::string* seed_signature, |
| 33 std::string* seed_country); |
29 }; | 34 }; |
30 | 35 |
31 #endif // CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_ | 36 #endif // CHROME_BROWSER_ANDROID_PREFERENCES_PREF_SERVICE_BRIDGE_H_ |
OLD | NEW |