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

Side by Side Diff: third_party/libaddressinput/chromium/chrome_metadata_source.cc

Issue 2232743003: third_party/libaddressinput: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | third_party/libaddressinput/chromium/json.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "third_party/libaddressinput/chromium/chrome_metadata_source.h" 5 #include "third_party/libaddressinput/chromium/chrome_metadata_source.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 } // namespace 53 } // namespace
54 54
55 ChromeMetadataSource::ChromeMetadataSource( 55 ChromeMetadataSource::ChromeMetadataSource(
56 const std::string& validation_data_url, 56 const std::string& validation_data_url,
57 net::URLRequestContextGetter* getter) 57 net::URLRequestContextGetter* getter)
58 : validation_data_url_(validation_data_url), 58 : validation_data_url_(validation_data_url),
59 getter_(getter) {} 59 getter_(getter) {}
60 60
61 ChromeMetadataSource::~ChromeMetadataSource() { 61 ChromeMetadataSource::~ChromeMetadataSource() {
62 STLDeleteValues(&requests_); 62 base::STLDeleteValues(&requests_);
63 } 63 }
64 64
65 void ChromeMetadataSource::Get(const std::string& key, 65 void ChromeMetadataSource::Get(const std::string& key,
66 const Callback& downloaded) const { 66 const Callback& downloaded) const {
67 const_cast<ChromeMetadataSource*>(this)->Download(key, downloaded); 67 const_cast<ChromeMetadataSource*>(this)->Download(key, downloaded);
68 } 68 }
69 69
70 void ChromeMetadataSource::OnURLFetchComplete(const net::URLFetcher* source) { 70 void ChromeMetadataSource::OnURLFetchComplete(const net::URLFetcher* source) {
71 std::map<const net::URLFetcher*, Request*>::iterator request = 71 std::map<const net::URLFetcher*, Request*>::iterator request =
72 requests_.find(source); 72 requests_.find(source);
(...skipping 30 matching lines...) Expand all
103 103
104 Request* request = new Request(key, std::move(fetcher), downloaded); 104 Request* request = new Request(key, std::move(fetcher), downloaded);
105 request->fetcher->SaveResponseWithWriter( 105 request->fetcher->SaveResponseWithWriter(
106 std::unique_ptr<net::URLFetcherResponseWriter>( 106 std::unique_ptr<net::URLFetcherResponseWriter>(
107 new UnownedStringWriter(&request->data))); 107 new UnownedStringWriter(&request->data)));
108 requests_[request->fetcher.get()] = request; 108 requests_[request->fetcher.get()] = request;
109 request->fetcher->Start(); 109 request->fetcher->Start();
110 } 110 }
111 111
112 } // namespace autofill 112 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698