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

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

Issue 2680143002: Use dropdown list for admin areas in pr form. (Closed)
Patch Set: Supress error-- suggested by clank team Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 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 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/payments/core/address_normalizer.h" 5 #include "components/payments/core/address_normalizer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 it->second.push_back(std::move(request)); 148 it->second.push_back(std::move(request));
149 149
150 // Start loading the rules for that region. If the rules were already in the 150 // Start loading the rules for that region. If the rules were already in the
151 // process of being loaded, this call will do nothing. 151 // process of being loaded, this call will do nothing.
152 LoadRulesForRegion(region_code); 152 LoadRulesForRegion(region_code);
153 } 153 }
154 } 154 }
155 155
156 void AddressNormalizer::OnAddressValidationRulesLoaded( 156 void AddressNormalizer::OnAddressRulesLoaded(const std::string& region_code,
157 const std::string& region_code, 157 bool success) {
158 bool success) {
159 // Check if an address normalization is pending. 158 // Check if an address normalization is pending.
160 auto it = pending_normalization_.find(region_code); 159 auto it = pending_normalization_.find(region_code);
161 if (it != pending_normalization_.end()) { 160 if (it != pending_normalization_.end()) {
162 for (size_t i = 0; i < it->second.size(); ++i) { 161 for (size_t i = 0; i < it->second.size(); ++i) {
163 it->second[i]->OnRulesLoaded(success); 162 it->second[i]->OnRulesLoaded(success);
164 } 163 }
165 pending_normalization_.erase(it); 164 pending_normalization_.erase(it);
166 } 165 }
167 } 166 }
168 167
169 } // namespace payments 168 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/core/address_normalizer.h ('k') | third_party/libaddressinput/chromium/chrome_address_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698