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

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: Eliminate usage of RPH observer 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 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 df435a6e45aa053366f392323963fe1c90988281..63d9cbc977216b7726a5a4b83779eec6d5049891 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -22,7 +22,7 @@
#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/renderer/document_state.h"
@@ -32,6 +32,7 @@
#include "extensions/common/url_pattern.h"
#include "net/base/url_util.h"
#include "net/http/http_response_headers.h"
+#include "services/shell/public/cpp/interface_provider.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
@@ -836,9 +837,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()->GetRemoteInterfaces()->GetInterface(
+ mojo::GetProxy(&data_reduction_proxy_host));
+ bool handled = data_reduction_proxy_host->IsDataReductionProxy(
dcheng 2016/08/26 19:16:20 What happens to this request if the other side is
leonhsl(Using Gerrit) 2016/08/29 06:12:06 Normally the other side will either bind or reject
+ 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