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

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

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add docs Created 7 years, 4 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 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 "components/autofill/content/browser/wallet/wallet_address.h" 5 #include "components/autofill/content/browser/wallet/wallet_address.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 #if defined(OS_ANDROID) 257 #if defined(OS_ANDROID)
258 // TODO(aruslan): improve this stub implementation. 258 // TODO(aruslan): improve this stub implementation.
259 return address_line_1(); 259 return address_line_1();
260 #else 260 #else
261 return string16(); 261 return string16();
262 #endif 262 #endif
263 } 263 }
264 264
265 string16 Address::GetInfo(const AutofillType& type, 265 string16 Address::GetInfo(const AutofillType& type,
266 const std::string& app_locale) const { 266 const std::string& app_locale) const {
267 switch (AutofillType::GetEquivalentFieldType(type.native_type())) { 267 switch (type.GetEquivalentNativeType()) {
268 case NAME_FULL: 268 case NAME_FULL:
269 return recipient_name(); 269 return recipient_name();
270 270
271 case ADDRESS_HOME_LINE1: 271 case ADDRESS_HOME_LINE1:
272 return address_line_1(); 272 return address_line_1();
273 273
274 case ADDRESS_HOME_LINE2: 274 case ADDRESS_HOME_LINE2:
275 return address_line_2(); 275 return address_line_2();
276 276
277 case ADDRESS_HOME_CITY: 277 case ADDRESS_HOME_CITY:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 bool Address::operator==(const Address& other) const { 313 bool Address::operator==(const Address& other) const {
314 return object_id_ == other.object_id_ && EqualsIgnoreID(other); 314 return object_id_ == other.object_id_ && EqualsIgnoreID(other);
315 } 315 }
316 316
317 bool Address::operator!=(const Address& other) const { 317 bool Address::operator!=(const Address& other) const {
318 return !(*this == other); 318 return !(*this == other);
319 } 319 }
320 320
321 } // namespace wallet 321 } // namespace wallet
322 } // namespace autofill 322 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698