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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2376403003: Convert RapporRecorder to use mojo. (Closed)
Patch Set: Convert RapporRecorder to use mojo. 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
« chrome/common/BUILD.gn ('K') | « chrome/renderer/chrome_content_renderer_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 9da2a604734032c954318beaa3af6b7834b200be..68941aded1201860bb27c0c6c76619284ff7fcb3 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1329,12 +1329,18 @@ ChromeContentRendererClient::CreateBrowserPluginDelegate(
void ChromeContentRendererClient::RecordRappor(const std::string& metric,
const std::string& sample) {
- RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRappor(metric, sample));
+ if (!rappor_recorder_) {
sky 2016/10/06 17:28:44 not {} here and 1340.
nigeltao1 2016/10/07 03:30:52 Done. I'm a recovering Go programmer. :-)
+ RenderThread::Get()->GetRemoteInterfaces()->GetInterface(&rappor_recorder_);
+ }
+ rappor_recorder_->RecordRappor(metric, sample);
}
void ChromeContentRendererClient::RecordRapporURL(const std::string& metric,
const GURL& url) {
- RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url));
+ if (!rappor_recorder_) {
+ RenderThread::Get()->GetRemoteInterfaces()->GetInterface(&rappor_recorder_);
+ }
+ rappor_recorder_->RecordRapporURL(metric, url);
}
std::unique_ptr<blink::WebAppBannerClient>
« chrome/common/BUILD.gn ('K') | « chrome/renderer/chrome_content_renderer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698