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

Unified Diff: net/proxy/proxy_list.cc

Issue 1286373002: Refactored not to expose raw pointers on ProxyList class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_list.cc
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
index 7d53b4cfb7ebd485eaada9d0096bfe012677bec1..1d24b6d113bb185643454dc40b92a28a6d8ad5c1 100644
--- a/net/proxy/proxy_list.cc
+++ b/net/proxy/proxy_list.cc
@@ -142,17 +142,16 @@ std::string ProxyList::ToPacString() const {
return proxy_list.empty() ? std::string() : proxy_list;
}
-base::ListValue* ProxyList::ToValue() const {
+scoped_ptr<base::ListValue> ProxyList::ToValue() const {
scoped_ptr<base::ListValue> list(new base::ListValue());
for (size_t i = 0; i < proxies_.size(); ++i)
list->AppendString(proxies_[i].ToURI());
- return list.release();
+ return list.Pass();
}
bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
int net_error,
const BoundNetLog& net_log) {
-
// TODO(eroman): It would be good if instead of removing failed proxies
// from the list, we simply annotated them with the error code they failed
// with. Of course, ProxyService::ReconsiderProxyAfterError() would need to
« no previous file with comments | « net/proxy/proxy_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698