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

Side by Side Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

Issue 347183005: autofill names - dont parse when calling SetRawInfo(FULL_NAME) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android test expectation Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/options/autofill_options_handler.h" 5 #include "chrome/browser/ui/webui/options/autofill_options_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_EXPIRATION_DATE)); 400 l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_EXPIRATION_DATE));
401 } 401 }
402 402
403 void AutofillOptionsHandler::LoadAutofillData() { 403 void AutofillOptionsHandler::LoadAutofillData() {
404 if (!IsPersonalDataLoaded()) 404 if (!IsPersonalDataLoaded())
405 return; 405 return;
406 406
407 const std::vector<AutofillProfile*>& profiles = 407 const std::vector<AutofillProfile*>& profiles =
408 personal_data_->web_profiles(); 408 personal_data_->web_profiles();
409 std::vector<base::string16> labels; 409 std::vector<base::string16> labels;
410 AutofillProfile::CreateDifferentiatingLabels(profiles, &labels); 410 AutofillProfile::CreateDifferentiatingLabels(
411 profiles,
412 g_browser_process->GetApplicationLocale(),
413 &labels);
411 DCHECK_EQ(labels.size(), profiles.size()); 414 DCHECK_EQ(labels.size(), profiles.size());
412 415
413 base::ListValue addresses; 416 base::ListValue addresses;
414 for (size_t i = 0; i < profiles.size(); ++i) { 417 for (size_t i = 0; i < profiles.size(); ++i) {
415 base::ListValue* entry = new base::ListValue(); 418 base::ListValue* entry = new base::ListValue();
416 entry->Append(new base::StringValue(profiles[i]->guid())); 419 entry->Append(new base::StringValue(profiles[i]->guid()));
417 entry->Append(new base::StringValue(labels[i])); 420 entry->Append(new base::StringValue(labels[i]));
418 addresses.Append(entry); 421 addresses.Append(entry);
419 } 422 }
420 423
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 675
673 web_ui()->CallJavascriptFunction( 676 web_ui()->CallJavascriptFunction(
674 "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value); 677 "AutofillEditAddressOverlay.setValidatedPhoneNumbers", *list_value);
675 } 678 }
676 679
677 bool AutofillOptionsHandler::IsPersonalDataLoaded() const { 680 bool AutofillOptionsHandler::IsPersonalDataLoaded() const {
678 return personal_data_ && personal_data_->IsDataLoaded(); 681 return personal_data_ && personal_data_->IsDataLoaded();
679 } 682 }
680 683
681 } // namespace options 684 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc ('k') | components/autofill/core/browser/address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698