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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Add a test for the current url API Created 4 years, 1 month 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b3b4e822ba2b0739870141f28e0dc31c20681428..40a5971af7a4091dc72f786ffb4b779d1a8af5b7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -30,6 +30,7 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/mime_util/mime_util.h"
+#include "components/rappor/rappor_utils.h"
#include "components/url_formatter/url_formatter.h"
#include "content/browser/accessibility/accessibility_mode_helper.h"
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
@@ -5233,4 +5234,14 @@ void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
binding_sets_.erase(it);
}
+::rappor::RapporService* WebContentsImpl::getRapporService() {
+ if (!GetDelegate())
+ return nullptr;
+ return GetDelegate()->getRapporService();
+}
+
+std::string WebContentsImpl::getRapporCommittedUrl() {
+ return ::rappor::GetDomainAndRegistrySampleFromGURL(GetLastCommittedURL());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698