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

Unified Diff: net/proxy/mojo_proxy_resolver_impl.cc

Issue 2083463002: Replace //net TypeConverters with StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-converter-cleanup--gurl
Patch Set: rebase Created 4 years, 2 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
Index: net/proxy/mojo_proxy_resolver_impl.cc
diff --git a/net/proxy/mojo_proxy_resolver_impl.cc b/net/proxy/mojo_proxy_resolver_impl.cc
index 2613af3baf28386803e37991116d58a736ab6f1c..7ef5eb6e9250eed96826ff52918a9c03fded87c7 100644
--- a/net/proxy/mojo_proxy_resolver_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_impl.cc
@@ -11,7 +11,6 @@
#include "base/stl_util.h"
#include "net/base/net_errors.h"
#include "net/proxy/mojo_proxy_resolver_v8_tracing_bindings.h"
-#include "net/proxy/mojo_proxy_type_converters.h"
#include "net/proxy/proxy_info.h"
#include "net/proxy/proxy_resolver_script_data.h"
#include "net/proxy/proxy_resolver_v8_tracing.h"
@@ -101,12 +100,11 @@ void MojoProxyResolverImpl::Job::GetProxyDone(int error) {
for (const auto& proxy : result_.proxy_list().GetAll()) {
DVLOG(1) << proxy.ToURI();
}
- mojo::Array<interfaces::ProxyServerPtr> result;
- if (error == OK) {
- result = mojo::Array<interfaces::ProxyServerPtr>::From(
- result_.proxy_list().GetAll());
- }
- client_->ReportResult(error, std::move(result));
+ if (error == OK)
+ client_->ReportResult(error, result_);
+ else
+ client_->ReportResult(error, ProxyInfo());
+
resolver_->DeleteJob(this);
}

Powered by Google App Engine
This is Rietveld 408576698