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

Side by Side Diff: chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc

Issue 2841603004: [Payments] Update some editor titles to reflect missing information (Closed)
Patch Set: Cleanup some strings Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/views/payments/contact_info_editor_view_controller.h " 5 #include "chrome/browser/ui/views/payments/contact_info_editor_view_controller.h "
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/views/payments/validating_textfield.h" 8 #include "chrome/browser/ui/views/payments/validating_textfield.h"
9 #include "components/autofill/core/browser/autofill_country.h" 9 #include "components/autofill/core/browser/autofill_country.h"
10 #include "components/autofill/core/browser/autofill_profile.h" 10 #include "components/autofill/core/browser/autofill_profile.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 std::unique_ptr<ui::ComboboxModel> 98 std::unique_ptr<ui::ComboboxModel>
99 ContactInfoEditorViewController::GetComboboxModelForType( 99 ContactInfoEditorViewController::GetComboboxModelForType(
100 const autofill::ServerFieldType& type) { 100 const autofill::ServerFieldType& type) {
101 NOTREACHED(); 101 NOTREACHED();
102 return nullptr; 102 return nullptr;
103 } 103 }
104 104
105 base::string16 ContactInfoEditorViewController::GetSheetTitle() { 105 base::string16 ContactInfoEditorViewController::GetSheetTitle() {
106 // TODO(crbug.com/712074): Title should reflect the missing information, if
107 // applicable.
106 return profile_to_edit_ ? l10n_util::GetStringUTF16( 108 return profile_to_edit_ ? l10n_util::GetStringUTF16(
107 IDS_PAYMENTS_EDIT_CONTACT_DETAILS_LABEL) 109 IDS_PAYMENTS_EDIT_CONTACT_DETAILS_LABEL)
108 : l10n_util::GetStringUTF16( 110 : l10n_util::GetStringUTF16(
109 IDS_PAYMENTS_ADD_CONTACT_DETAILS_LABEL); 111 IDS_PAYMENTS_ADD_CONTACT_DETAILS_LABEL);
110 } 112 }
111 113
112 bool ContactInfoEditorViewController::ValidateModel() { 114 bool ContactInfoEditorViewController::ValidateModel() {
113 for (const auto& field : text_fields()) { 115 for (const auto& field : text_fields()) {
114 // Force a blur, as validation only occurs after the first blur. 116 // Force a blur, as validation only occurs after the first blur.
115 field.first->OnBlur(); 117 field.first->OnBlur();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 189 }
188 190
189 bool ContactInfoEditorViewController::ContactInfoValidationDelegate:: 191 bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
190 ValidateCombobox(views::Combobox* combobox) { 192 ValidateCombobox(views::Combobox* combobox) {
191 // This UI doesn't contain any comboboxes. 193 // This UI doesn't contain any comboboxes.
192 NOTREACHED(); 194 NOTREACHED();
193 return true; 195 return true;
194 } 196 }
195 197
196 } // namespace payments 198 } // namespace payments
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698