| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/autofill/android/personal_data_manager_android.h" | 5 #include "chrome/browser/autofill/android/personal_data_manager_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // Returns an ISO 3166-1-alpha-2 country code for a |jcountry_name| using | 306 // Returns an ISO 3166-1-alpha-2 country code for a |jcountry_name| using |
| 307 // the application locale, or an empty string. | 307 // the application locale, or an empty string. |
| 308 static jstring ToCountryCode(JNIEnv* env, jclass clazz, jstring jcountry_name) { | 308 static jstring ToCountryCode(JNIEnv* env, jclass clazz, jstring jcountry_name) { |
| 309 return ConvertUTF8ToJavaString( | 309 return ConvertUTF8ToJavaString( |
| 310 env, | 310 env, |
| 311 AutofillCountry::GetCountryCode( | 311 AutofillCountry::GetCountryCode( |
| 312 base::android::ConvertJavaStringToUTF16(env, jcountry_name), | 312 base::android::ConvertJavaStringToUTF16(env, jcountry_name), |
| 313 g_browser_process->GetApplicationLocale())).Release(); | 313 g_browser_process->GetApplicationLocale())).Release(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 static jint Init(JNIEnv* env, jobject obj) { | 316 static jlong Init(JNIEnv* env, jobject obj) { |
| 317 PersonalDataManagerAndroid* personal_data_manager_android = | 317 PersonalDataManagerAndroid* personal_data_manager_android = |
| 318 new PersonalDataManagerAndroid(env, obj); | 318 new PersonalDataManagerAndroid(env, obj); |
| 319 return reinterpret_cast<jint>(personal_data_manager_android); | 319 return reinterpret_cast<intptr_t>(personal_data_manager_android); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace autofill | 322 } // namespace autofill |
| OLD | NEW |