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

Unified Diff: chrome/browser/content_settings/chrome_content_settings_utils.cc

Issue 2048303002: Fix broken mixed script Rappor metric and add browser test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments 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/browser/content_settings/chrome_content_settings_utils.cc
diff --git a/chrome/browser/content_settings/chrome_content_settings_utils.cc b/chrome/browser/content_settings/chrome_content_settings_utils.cc
index 342fc193cc77f6b887666fde3bb3784ad5b601fe..3e04c832e6a7e8e4f6e56a358929ed519fb56603 100644
--- a/chrome/browser/content_settings/chrome_content_settings_utils.cc
+++ b/chrome/browser/content_settings/chrome_content_settings_utils.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/content_settings/chrome_content_settings_utils.h"
#include "base/metrics/histogram.h"
-#include "chrome/browser/browser_process.h"
+#include "components/rappor/rappor_service.h"
#include "components/rappor/rappor_utils.h"
namespace content_settings {
@@ -15,7 +15,8 @@ void RecordMixedScriptAction(MixedScriptAction action) {
MIXED_SCRIPT_ACTION_COUNT);
}
-void RecordMixedScriptActionWithRAPPOR(MixedScriptAction action,
+void RecordMixedScriptActionWithRAPPOR(rappor::RapporService* rappor_service,
+ MixedScriptAction action,
const GURL& url) {
std::string metric;
switch (action) {
@@ -29,9 +30,7 @@ void RecordMixedScriptActionWithRAPPOR(MixedScriptAction action,
NOTREACHED();
}
- rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
- metric,
- url);
+ rappor::SampleDomainAndRegistryFromGURL(rappor_service, metric, url);
}
} // namespace content_settings

Powered by Google App Engine
This is Rietveld 408576698