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

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

Issue 127223003: [rAc - libaddressinput] Chrome download impl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync'd 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,
(...skipping 15 matching lines...) Expand all
26 #include <string> 26 #include <string>
27 #include <utility> 27 #include <utility>
28 28
29 #include "lookup_key_util.h" 29 #include "lookup_key_util.h"
30 #include "util/stl_util.h" 30 #include "util/stl_util.h"
31 31
32 namespace i18n { 32 namespace i18n {
33 namespace addressinput { 33 namespace addressinput {
34 34
35 Retriever::Retriever(const std::string& validation_data_url, 35 Retriever::Retriever(const std::string& validation_data_url,
36 scoped_ptr<const Downloader> downloader, 36 scoped_ptr<Downloader> downloader,
37 scoped_ptr<Storage> storage) 37 scoped_ptr<Storage> storage)
38 : lookup_key_util_(validation_data_url), 38 : lookup_key_util_(validation_data_url),
39 downloader_(downloader.Pass()), 39 downloader_(downloader.Pass()),
40 storage_(storage.Pass()) { 40 storage_(storage.Pass()) {
41 assert(storage_ != NULL); 41 assert(storage_ != NULL);
42 assert(downloader_ != NULL); 42 assert(downloader_ != NULL);
43 } 43 }
44 44
45 Retriever::~Retriever() { 45 Retriever::~Retriever() {
46 STLDeleteValues(&requests_); 46 STLDeleteValues(&requests_);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 std::map<std::string, Callback*>::iterator iter = 82 std::map<std::string, Callback*>::iterator iter =
83 requests_.find(key); 83 requests_.find(key);
84 assert(iter != requests_.end()); 84 assert(iter != requests_.end());
85 scoped_ptr<Callback> callback(iter->second); 85 scoped_ptr<Callback> callback(iter->second);
86 requests_.erase(iter); 86 requests_.erase(iter);
87 return callback.Pass(); 87 return callback.Pass();
88 } 88 }
89 89
90 } // namespace addressinput 90 } // namespace addressinput
91 } // namespace i18n 91 } // namespace i18n
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698