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

Side by Side Diff: components/autofill/browser/wallet/wallet_address.cc

Issue 12755019: Add 2-lines summary to CC/Address for Wallet items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 "components/autofill/browser/wallet/wallet_address.h" 5 #include "components/autofill/browser/wallet/wallet_address.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/autofill/browser/autofill_country.h" 10 #include "components/autofill/browser/autofill_country.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 dict->SetString("postal_code_number", postal_code_number_); 200 dict->SetString("postal_code_number", postal_code_number_);
201 201
202 return dict.Pass(); 202 return dict.Pass();
203 } 203 }
204 204
205 string16 Address::DisplayName() const { 205 string16 Address::DisplayName() const {
206 // TODO(estade): improve this stub implementation. 206 // TODO(estade): improve this stub implementation.
207 return recipient_name() + ASCIIToUTF16(", ") + address_line_1(); 207 return recipient_name() + ASCIIToUTF16(", ") + address_line_1();
208 } 208 }
209 209
210 string16 Address::DisplaySummaryLine1() const {
211 // TODO(aruslan): improve this stub implementation.
212 return recipient_name();
213 }
214
215 string16 Address::DisplaySummaryLine2() const {
216 // TODO(aruslan): improve this stub implementation.
217 return address_line_1();
218 }
219
210 string16 Address::GetInfo(AutofillFieldType type) const { 220 string16 Address::GetInfo(AutofillFieldType type) const {
211 switch (type) { 221 switch (type) {
212 case NAME_FULL: 222 case NAME_FULL:
213 return recipient_name(); 223 return recipient_name();
214 224
215 case ADDRESS_HOME_LINE1: 225 case ADDRESS_HOME_LINE1:
216 return address_line_1(); 226 return address_line_1();
217 227
218 case ADDRESS_HOME_LINE2: 228 case ADDRESS_HOME_LINE2:
219 return address_line_2(); 229 return address_line_2();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 phone_number_ == other.phone_number_ && 264 phone_number_ == other.phone_number_ &&
255 object_id_ == other.object_id_; 265 object_id_ == other.object_id_;
256 } 266 }
257 267
258 bool Address::operator!=(const Address& other) const { 268 bool Address::operator!=(const Address& other) const {
259 return !(*this == other); 269 return !(*this == other);
260 } 270 }
261 271
262 } // namespace wallet 272 } // namespace wallet
263 } // namespace autofill 273 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698