Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: chrome/browser/autofill/android/personal_data_manager_android.cc

Issue 2158763002: Revert of [Payments] Add ability to bold parts of addresses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@payments_continuing
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/autofill/android/personal_data_manager_android.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 std::vector<ServerFieldType> label_fields; 376 std::vector<ServerFieldType> label_fields;
377 label_fields.push_back(COMPANY_NAME); 377 label_fields.push_back(COMPANY_NAME);
378 label_fields.push_back(ADDRESS_HOME_LINE1); 378 label_fields.push_back(ADDRESS_HOME_LINE1);
379 label_fields.push_back(ADDRESS_HOME_LINE2); 379 label_fields.push_back(ADDRESS_HOME_LINE2);
380 label_fields.push_back(ADDRESS_HOME_DEPENDENT_LOCALITY); 380 label_fields.push_back(ADDRESS_HOME_DEPENDENT_LOCALITY);
381 label_fields.push_back(ADDRESS_HOME_CITY); 381 label_fields.push_back(ADDRESS_HOME_CITY);
382 label_fields.push_back(ADDRESS_HOME_STATE); 382 label_fields.push_back(ADDRESS_HOME_STATE);
383 label_fields.push_back(ADDRESS_HOME_ZIP); 383 label_fields.push_back(ADDRESS_HOME_ZIP);
384 label_fields.push_back(ADDRESS_HOME_SORTING_CODE); 384 label_fields.push_back(ADDRESS_HOME_SORTING_CODE);
385 label_fields.push_back(ADDRESS_HOME_COUNTRY); 385 label_fields.push_back(ADDRESS_HOME_COUNTRY);
386 label_fields.push_back(PHONE_HOME_WHOLE_NUMBER);
386 387
387 AutofillProfile profile; 388 AutofillProfile profile;
388 PopulateNativeProfileFromJava(jprofile, env, &profile); 389 PopulateNativeProfileFromJava(jprofile, env, &profile);
389 390
390 return ConvertUTF16ToJavaString( 391 return ConvertUTF16ToJavaString(
391 env, profile.ConstructInferredLabel( 392 env, profile.ConstructInferredLabel(
392 label_fields, label_fields.size(), 393 label_fields, label_fields.size(),
393 g_browser_process->GetApplicationLocale())); 394 g_browser_process->GetApplicationLocale()));
394 } 395 }
395 396
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 suggested_fields.reset(new std::vector<ServerFieldType>); 622 suggested_fields.reset(new std::vector<ServerFieldType>);
622 suggested_fields->push_back(COMPANY_NAME); 623 suggested_fields->push_back(COMPANY_NAME);
623 suggested_fields->push_back(ADDRESS_HOME_LINE1); 624 suggested_fields->push_back(ADDRESS_HOME_LINE1);
624 suggested_fields->push_back(ADDRESS_HOME_LINE2); 625 suggested_fields->push_back(ADDRESS_HOME_LINE2);
625 suggested_fields->push_back(ADDRESS_HOME_DEPENDENT_LOCALITY); 626 suggested_fields->push_back(ADDRESS_HOME_DEPENDENT_LOCALITY);
626 suggested_fields->push_back(ADDRESS_HOME_CITY); 627 suggested_fields->push_back(ADDRESS_HOME_CITY);
627 suggested_fields->push_back(ADDRESS_HOME_STATE); 628 suggested_fields->push_back(ADDRESS_HOME_STATE);
628 suggested_fields->push_back(ADDRESS_HOME_ZIP); 629 suggested_fields->push_back(ADDRESS_HOME_ZIP);
629 suggested_fields->push_back(ADDRESS_HOME_SORTING_CODE); 630 suggested_fields->push_back(ADDRESS_HOME_SORTING_CODE);
630 suggested_fields->push_back(ADDRESS_HOME_COUNTRY); 631 suggested_fields->push_back(ADDRESS_HOME_COUNTRY);
632 suggested_fields->push_back(PHONE_HOME_WHOLE_NUMBER);
631 minimal_fields_shown = suggested_fields->size(); 633 minimal_fields_shown = suggested_fields->size();
632 } 634 }
633 635
634 std::vector<base::string16> labels; 636 std::vector<base::string16> labels;
635 AutofillProfile::CreateInferredLabels( 637 AutofillProfile::CreateInferredLabels(
636 profiles, suggested_fields.get(), NAME_FULL, minimal_fields_shown, 638 profiles, suggested_fields.get(), NAME_FULL, minimal_fields_shown,
637 g_browser_process->GetApplicationLocale(), &labels); 639 g_browser_process->GetApplicationLocale(), &labels);
638 640
639 return base::android::ToJavaArrayOfStrings(env, labels); 641 return base::android::ToJavaArrayOfStrings(env, labels);
640 } 642 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 base::android::ConvertJavaStringToUTF16(env, jcountry_name))); 685 base::android::ConvertJavaStringToUTF16(env, jcountry_name)));
684 } 686 }
685 687
686 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 688 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
687 PersonalDataManagerAndroid* personal_data_manager_android = 689 PersonalDataManagerAndroid* personal_data_manager_android =
688 new PersonalDataManagerAndroid(env, obj); 690 new PersonalDataManagerAndroid(env, obj);
689 return reinterpret_cast<intptr_t>(personal_data_manager_android); 691 return reinterpret_cast<intptr_t>(personal_data_manager_android);
690 } 692 }
691 693
692 } // namespace autofill 694 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autofill/android/personal_data_manager_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698