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

Side by Side Diff: net/proxy/proxy_list.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « net/proxy/proxy_config.cc ('k') | net/proxy/proxy_resolver_factory_mojo.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/proxy/proxy_list.h" 5 #include "net/proxy/proxy_list.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_tokenizer.h" 9 #include "base/strings/string_tokenizer.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 proxy_list += ";"; 139 proxy_list += ";";
140 proxy_list += iter->ToPacString(); 140 proxy_list += iter->ToPacString();
141 } 141 }
142 return proxy_list.empty() ? std::string() : proxy_list; 142 return proxy_list.empty() ? std::string() : proxy_list;
143 } 143 }
144 144
145 scoped_ptr<base::ListValue> ProxyList::ToValue() const { 145 scoped_ptr<base::ListValue> ProxyList::ToValue() const {
146 scoped_ptr<base::ListValue> list(new base::ListValue()); 146 scoped_ptr<base::ListValue> list(new base::ListValue());
147 for (size_t i = 0; i < proxies_.size(); ++i) 147 for (size_t i = 0; i < proxies_.size(); ++i)
148 list->AppendString(proxies_[i].ToURI()); 148 list->AppendString(proxies_[i].ToURI());
149 return list.Pass(); 149 return list;
150 } 150 }
151 151
152 bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info, 152 bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
153 int net_error, 153 int net_error,
154 const BoundNetLog& net_log) { 154 const BoundNetLog& net_log) {
155 // TODO(eroman): It would be good if instead of removing failed proxies 155 // TODO(eroman): It would be good if instead of removing failed proxies
156 // from the list, we simply annotated them with the error code they failed 156 // from the list, we simply annotated them with the error code they failed
157 // with. Of course, ProxyService::ReconsiderProxyAfterError() would need to 157 // with. Of course, ProxyService::ReconsiderProxyAfterError() would need to
158 // be given this information by the network transaction. 158 // be given this information by the network transaction.
159 // 159 //
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // If any additional proxies to bypass are specified, add to the retry map 225 // If any additional proxies to bypass are specified, add to the retry map
226 // as well. 226 // as well.
227 for (const ProxyServer& additional_proxy : additional_proxies_to_bypass) { 227 for (const ProxyServer& additional_proxy : additional_proxies_to_bypass) {
228 AddProxyToRetryList(proxy_retry_info, retry_delay, reconsider, 228 AddProxyToRetryList(proxy_retry_info, retry_delay, reconsider,
229 additional_proxy, net_error, net_log); 229 additional_proxy, net_error, net_log);
230 } 230 }
231 } 231 }
232 } 232 }
233 233
234 } // namespace net 234 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config.cc ('k') | net/proxy/proxy_resolver_factory_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698