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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.h

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/tab_specific_content_settings.h
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index dc20cd102122327bfc9bba8173c947eaabe916de..e8bb842a9bf64327aaf44bd044135ddd378dc322 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -37,6 +37,10 @@ namespace net {
class CookieOptions;
}
+namespace rappor {
+class RapporService;
+}
+
// This class manages state about permissions, content settings, cookies and
// site data for a specific WebContents. It tracks which content was accessed
// and which content was blocked. Based on this it provides information about
@@ -366,6 +370,9 @@ class TabSpecificContentSettings
// Block all content. Used for testing content setting bubbles.
void BlockAllContentForTesting();
+ // Set the Rappor service used for testing.
+ void SetRapporServiceForTesting(rappor::RapporService* rappor_service);
+
private:
friend class content::WebContentsUserData<TabSpecificContentSettings>;
@@ -470,6 +477,9 @@ class TabSpecificContentSettings
// Observer to watch for content settings changed.
ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;
+ // The service used to record Rappor metrics. Can be set for testing.
+ rappor::RapporService* rappor_service_;
+
DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings);
};

Powered by Google App Engine
This is Rietveld 408576698