OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_METADATA_SOURCE_H_ | 5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_METADATA_SOURCE_H_ |
6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_METADATA_SOURCE_H_ | 6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_METADATA_SOURCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // addresses. | 23 // addresses. |
24 class ChromeMetadataSource : public ::i18n::addressinput::Source, | 24 class ChromeMetadataSource : public ::i18n::addressinput::Source, |
25 public net::URLFetcherDelegate { | 25 public net::URLFetcherDelegate { |
26 public: | 26 public: |
27 ChromeMetadataSource(const std::string& validation_data_url, | 27 ChromeMetadataSource(const std::string& validation_data_url, |
28 net::URLRequestContextGetter* getter); | 28 net::URLRequestContextGetter* getter); |
29 virtual ~ChromeMetadataSource(); | 29 virtual ~ChromeMetadataSource(); |
30 | 30 |
31 // ::i18n::addressinput::Source: | 31 // ::i18n::addressinput::Source: |
32 virtual void Get(const std::string& key, | 32 virtual void Get(const std::string& key, |
33 const Callback& downloaded) const OVERRIDE; | 33 const Callback& downloaded) const override; |
34 | 34 |
35 // net::URLFetcherDelegate: | 35 // net::URLFetcherDelegate: |
36 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 36 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
37 | 37 |
38 private: | 38 private: |
39 struct Request { | 39 struct Request { |
40 Request(const std::string& key, | 40 Request(const std::string& key, |
41 scoped_ptr<net::URLFetcher> fetcher, | 41 scoped_ptr<net::URLFetcher> fetcher, |
42 const Callback& callback); | 42 const Callback& callback); |
43 | 43 |
44 std::string key; | 44 std::string key; |
45 // The data that's received. | 45 // The data that's received. |
46 std::string data; | 46 std::string data; |
(...skipping 10 matching lines...) Expand all Loading... |
57 | 57 |
58 // Maps from active URL fetcher to request metadata. The value is owned. | 58 // Maps from active URL fetcher to request metadata. The value is owned. |
59 std::map<const net::URLFetcher*, Request*> requests_; | 59 std::map<const net::URLFetcher*, Request*> requests_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(ChromeMetadataSource); | 61 DISALLOW_COPY_AND_ASSIGN(ChromeMetadataSource); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace autofill | 64 } // namespace autofill |
65 | 65 |
66 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_METADATA_SOURCE_H_ | 66 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_METADATA_SOURCE_H_ |
OLD | NEW |