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

Side by Side Diff: third_party/libaddressinput/chromium/cpp/src/address_validator.cc

Issue 125633003: [rAc - libaddressinput] slay another helper class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 (C) 2013 Google Inc. 1 // Copyright (C) 2013 Google Inc.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include <libaddressinput/address_validator.h> 15 #include <libaddressinput/address_validator.h>
16 16
17 #include <libaddressinput/downloader.h> 17 #include <libaddressinput/downloader.h>
18 #include <libaddressinput/load_rules_delegate.h> 18 #include <libaddressinput/load_rules_delegate.h>
19 #include <libaddressinput/localization.h> 19 #include <libaddressinput/localization.h>
20 #include <libaddressinput/storage.h> 20 #include <libaddressinput/storage.h>
21 21
22 #include <string> 22 #include <string>
23 23
24 #include "retriever.h" 24 #include "retriever.h"
25 #include "validating_storage.h"
26 25
27 namespace i18n { 26 namespace i18n {
28 namespace addressinput { 27 namespace addressinput {
29 28
30 AddressValidator::AddressValidator(scoped_ptr<const Downloader> downloader, 29 AddressValidator::AddressValidator(scoped_ptr<const Downloader> downloader,
31 scoped_ptr<Storage> storage, 30 scoped_ptr<Storage> storage,
32 LoadRulesDelegate* load_rules_delegate) 31 LoadRulesDelegate* load_rules_delegate)
33 : retriever_(new Retriever( 32 : retriever_(new Retriever(
34 VALIDATION_DATA_URL, 33 VALIDATION_DATA_URL,
35 downloader.Pass(), 34 downloader.Pass(),
36 scoped_ptr<Storage>(new ValidatingStorage(storage.Pass())))), 35 scoped_ptr<Storage>(storage.Pass()))),
37 load_rules_delegate_(load_rules_delegate) {} 36 load_rules_delegate_(load_rules_delegate) {}
38 37
39 AddressValidator::~AddressValidator() {} 38 AddressValidator::~AddressValidator() {}
40 39
41 void AddressValidator::LoadRules(const std::string& country_code) {} 40 void AddressValidator::LoadRules(const std::string& country_code) {}
42 41
43 AddressValidator::Status AddressValidator::ValidateAddress( 42 AddressValidator::Status AddressValidator::ValidateAddress(
44 const AddressData& address, 43 const AddressData& address,
45 const AddressProblemFilter& filter, 44 const AddressProblemFilter& filter,
46 const Localization& localization, 45 const Localization& localization,
47 AddressProblems* problems) const { 46 AddressProblems* problems) const {
48 return RULES_UNAVAILABLE; 47 return RULES_UNAVAILABLE;
49 } 48 }
50 49
51 } // namespace addressinput 50 } // namespace addressinput
52 } // namespace i18n 51 } // namespace i18n
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698