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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentAddress.cpp

Issue 2352513002: PaymentRequest: Deprecate careOf attribute in PaymentAddress. (Closed)
Patch Set: test Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "modules/payments/PaymentAddress.h" 5 #include "modules/payments/PaymentAddress.h"
6 6
7 #include "bindings/core/v8/V8ObjectBuilder.h" 7 #include "bindings/core/v8/V8ObjectBuilder.h"
8 #include "wtf/text/StringBuilder.h" 8 #include "wtf/text/StringBuilder.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 PaymentAddress::PaymentAddress(mojom::blink::PaymentAddressPtr address) 12 PaymentAddress::PaymentAddress(mojom::blink::PaymentAddressPtr address)
13 : m_country(address->country) 13 : m_country(address->country)
14 , m_addressLine(address->address_line.PassStorage()) 14 , m_addressLine(address->address_line.PassStorage())
15 , m_region(address->region) 15 , m_region(address->region)
16 , m_city(address->city) 16 , m_city(address->city)
17 , m_dependentLocality(address->dependent_locality) 17 , m_dependentLocality(address->dependent_locality)
18 , m_postalCode(address->postal_code) 18 , m_postalCode(address->postal_code)
19 , m_sortingCode(address->sorting_code) 19 , m_sortingCode(address->sorting_code)
20 , m_languageCode(address->language_code) 20 , m_languageCode(address->language_code)
21 , m_organization(address->organization) 21 , m_organization(address->organization)
22 , m_recipient(address->recipient) 22 , m_recipient(address->recipient)
23 , m_careOf(address->careOf)
24 , m_phone(address->phone) 23 , m_phone(address->phone)
25 { 24 {
26 if (!m_languageCode.isEmpty() && !address->script_code.isEmpty()) { 25 if (!m_languageCode.isEmpty() && !address->script_code.isEmpty()) {
27 StringBuilder builder; 26 StringBuilder builder;
28 builder.append(m_languageCode); 27 builder.append(m_languageCode);
29 builder.append('-'); 28 builder.append('-');
30 builder.append(address->script_code); 29 builder.append(address->script_code);
31 m_languageCode = builder.toString(); 30 m_languageCode = builder.toString();
32 } 31 }
33 } 32 }
(...skipping 11 matching lines...) Expand all
45 result.addString("postalCode", postalCode()); 44 result.addString("postalCode", postalCode());
46 result.addString("sortingCode", sortingCode()); 45 result.addString("sortingCode", sortingCode());
47 result.addString("languageCode", languageCode()); 46 result.addString("languageCode", languageCode());
48 result.addString("organization", organization()); 47 result.addString("organization", organization());
49 result.addString("recipient", recipient()); 48 result.addString("recipient", recipient());
50 result.addString("phone", phone()); 49 result.addString("phone", phone());
51 return result.scriptValue(); 50 return result.scriptValue();
52 } 51 }
53 52
54 } // namespace blink 53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698