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

Unified Diff: chrome/browser/extensions/webstore_inline_installer.cc

Issue 2831263003: Gate sending referrers to CWS on whether the profile has SafeBrowsing enabled. (Closed)
Patch Set: Devlin feedback. Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_inline_installer_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_inline_installer.cc
diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc
index 52f23c280b536524cd98810999f1609540765df7..82bf478ea0e794c9dd0a7feb9f868866b71deaee 100644
--- a/chrome/browser/extensions/webstore_inline_installer.cc
+++ b/chrome/browser/extensions/webstore_inline_installer.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
+#include "chrome/common/pref_names.h"
+#include "components/prefs/pref_service.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
@@ -107,6 +109,11 @@ std::string WebstoreInlineInstaller::GetJsonPostData() {
if (!web_contents())
return std::string();
+ // Report extra data only when SafeBrowsing is enabled for the current
+ // profile.
+ if (!profile()->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled))
+ return std::string();
+
content::NavigationController& navigation_controller =
web_contents()->GetController();
content::NavigationEntry* navigation_entry =
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_inline_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698