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

Unified Diff: chrome/renderer/page_load_histograms.cc

Issue 2063683002: Migrate components/data_reduction_proxy to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add gyp Created 4 years, 6 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: chrome/renderer/page_load_histograms.cc
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc
index 77c988690b08e85e244e447b3c9cc61edfdac46c..75743ca08e28399728491306a8868021d3289cf0 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -21,9 +21,10 @@
#include "base/time/time.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/renderer/searchbox/search_bouncer.h"
-#include "components/data_reduction_proxy/content/common/data_reduction_proxy_messages.h"
+#include "components/data_reduction_proxy/content/common/data_reduction_proxy.mojom.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/service_registry.h"
#include "content/public/renderer/document_state.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
@@ -887,9 +888,12 @@ void PageLoadHistograms::Dump(WebFrame* frame) {
bool data_reduction_proxy_was_used = false;
if (!document_state->proxy_server().IsEmpty()) {
- bool handled =
- Send(new DataReductionProxyViewHostMsg_IsDataReductionProxy(
- document_state->proxy_server(), &data_reduction_proxy_was_used));
+ data_reduction_proxy::mojom::DataReductionProxyHostPtr
+ data_reduction_proxy_host;
+ content::RenderThread::Get()->GetServiceRegistry()->ConnectToRemoteService(
+ mojo::GetProxy(&data_reduction_proxy_host));
+ bool handled = data_reduction_proxy_host->IsDataReductionProxy(
+ document_state->proxy_server(), &data_reduction_proxy_was_used);
// If the IPC call is not handled, then |data_reduction_proxy_was_used|
// should remain |false|.
DCHECK(handled || !data_reduction_proxy_was_used);

Powered by Google App Engine
This is Rietveld 408576698