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

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

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
« no previous file with comments | « components/payments/core/BUILD.gn ('k') | components/payments/core/test_address_normalizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_PAYMENTS_CORE_TEST_ADDRESS_NORMALIZER_H_
6 #define COMPONENTS_PAYMENTS_CORE_TEST_ADDRESS_NORMALIZER_H_
7
8 #include "components/payments/core/address_normalizer.h"
9
10 #include "components/autofill/core/browser/autofill_profile.h"
11
12 namespace payments {
13
14 // A simpler version of the address normalizer to be used in tests. Can be set
15 // to normalize instantaneously or to wait for a call.
16 class TestAddressNormalizer : public AddressNormalizer {
17 public:
18 TestAddressNormalizer() {}
19
20 void LoadRulesForRegion(const std::string& region_code) override {}
21
22 bool AreRulesLoadedForRegion(const std::string& region_code) override;
23
24 void StartAddressNormalization(
25 const autofill::AutofillProfile& profile,
26 const std::string& region_code,
27 int timeout_seconds,
28 AddressNormalizer::Delegate* requester) override;
29
30 void OnAddressValidationRulesLoaded(const std::string& region_code,
31 bool success) override {}
32
33 void DelayNormalization();
34
35 void CompleteAddressNormalization();
36
37 private:
38 autofill::AutofillProfile profile_;
39 AddressNormalizer::Delegate* requester_;
40
41 bool instantaneous_normalization_ = true;
42 };
43
44 } // namespace payments
45
46 #endif // COMPONENTS_PAYMENTS_CORE_TEST_ADDRESS_NORMALIZER_H_
OLDNEW
« no previous file with comments | « components/payments/core/BUILD.gn ('k') | components/payments/core/test_address_normalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698