Chromium Code Reviews| 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..62e0f41cf6c4c8a554a26e13172783e9c8a5789a 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,13 @@ std::string WebstoreInlineInstaller::GetJsonPostData() { |
| if (!web_contents()) |
| return std::string(); |
| + // Report extra data only when SafeBrowsing is enabled for the current |
| + // profile. |
| + Profile* profile = |
| + Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
|
Devlin
2017/04/21 17:09:43
nit: looks like WebstoreStandaloneInstaller has a
robertshield
2017/04/21 18:02:54
Thanks, done.
|
| + if (!profile->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled)) |
| + return std::string(); |
| + |
| content::NavigationController& navigation_controller = |
| web_contents()->GetController(); |
| content::NavigationEntry* navigation_entry = |