| 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/ui/android/autofill/autofill_dialog_result.h" | 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_result.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 (env), FETCH_JFIELD((env), (jobj), cls, getter).obj())) | 39 (env), FETCH_JFIELD((env), (jobj), cls, getter).obj())) |
| 40 | 40 |
| 41 scoped_ptr<wallet::Address> ParseJavaWalletAddress( | 41 scoped_ptr<wallet::Address> ParseJavaWalletAddress( |
| 42 JNIEnv* env, jobject address) { | 42 JNIEnv* env, jobject address) { |
| 43 if (!address) | 43 if (!address) |
| 44 return scoped_ptr<wallet::Address>(); | 44 return scoped_ptr<wallet::Address>(); |
| 45 | 45 |
| 46 const base::string16 recipient_name = | 46 const base::string16 recipient_name = |
| 47 FETCH_JSTRING(UTF16, env, address, ResultAddress, Name); | 47 FETCH_JSTRING(UTF16, env, address, ResultAddress, Name); |
| 48 | 48 |
| 49 std::vector<base::string16> address_lines; | |
| 50 const base::string16 street_address = | 49 const base::string16 street_address = |
| 51 FETCH_JSTRING(UTF16, env, address, ResultAddress, StreetAddress); | 50 FETCH_JSTRING(UTF16, env, address, ResultAddress, StreetAddress); |
| 52 base::SplitString(street_address, base::char16('\n'), &address_lines); | 51 std::vector<base::string16> address_lines = base::SplitString( |
| 52 street_address, base::string16(1, '\n'), |
| 53 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 53 | 54 |
| 54 const base::string16 locality_name = | 55 const base::string16 locality_name = |
| 55 FETCH_JSTRING(UTF16, env, address, ResultAddress, Locality); | 56 FETCH_JSTRING(UTF16, env, address, ResultAddress, Locality); |
| 56 const base::string16 dependent_locality_name = | 57 const base::string16 dependent_locality_name = |
| 57 FETCH_JSTRING(UTF16, env, address, ResultAddress, DependentLocality); | 58 FETCH_JSTRING(UTF16, env, address, ResultAddress, DependentLocality); |
| 58 const base::string16 administrative_area_name = | 59 const base::string16 administrative_area_name = |
| 59 FETCH_JSTRING(UTF16, env, address, ResultAddress, AdministrativeArea); | 60 FETCH_JSTRING(UTF16, env, address, ResultAddress, AdministrativeArea); |
| 60 const base::string16 postal_code_number = | 61 const base::string16 postal_code_number = |
| 61 FETCH_JSTRING(UTF16, env, address, ResultAddress, PostalCode); | 62 FETCH_JSTRING(UTF16, env, address, ResultAddress, PostalCode); |
| 62 const base::string16 sorting_code = | 63 const base::string16 sorting_code = |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 JNIEnv* env, jobject wallet) { | 140 JNIEnv* env, jobject wallet) { |
| 140 return ParseGoogleTransactionId(env, wallet); | 141 return ParseGoogleTransactionId(env, wallet); |
| 141 } | 142 } |
| 142 | 143 |
| 143 // static | 144 // static |
| 144 bool AutofillDialogResult::RegisterAutofillDialogResult(JNIEnv* env) { | 145 bool AutofillDialogResult::RegisterAutofillDialogResult(JNIEnv* env) { |
| 145 return RegisterNativesImpl(env); | 146 return RegisterNativesImpl(env); |
| 146 } | 147 } |
| 147 | 148 |
| 148 } // namespace autofill | 149 } // namespace autofill |
| OLD | NEW |