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

Side by Side Diff: components/payments/core/test_address_normalizer.cc

Issue 2836353002: [Payments] Normalize shipping address change on Desktop (Closed)
Patch Set: Addressed Math's comments Created 3 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/payments/core/test_address_normalizer.h"
6
7 namespace payments {
8
9 bool TestAddressNormalizer::AreRulesLoadedForRegion(
10 const std::string& region_code) {
11 return true;
12 }
13
14 void TestAddressNormalizer::StartAddressNormalization(
15 const autofill::AutofillProfile& profile,
16 const std::string& region_code,
17 int timeout_seconds,
18 AddressNormalizer::Delegate* requester) {
19 if (instantaneous_normalization_) {
20 requester->OnAddressNormalized(profile);
21 return;
22 }
23
24 // Setup the necessary variables for the delayed normalization.
25 profile_ = profile;
26 requester_ = requester;
27 }
28
29 void TestAddressNormalizer::DelayNormalization() {
30 instantaneous_normalization_ = false;
31 }
32
33 void TestAddressNormalizer::CompleteAddressNormalization() {
34 requester_->OnAddressNormalized(profile_);
35 }
36
37 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/core/test_address_normalizer.h ('k') | components/payments/core/test_payment_request_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698