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

Unified Diff: chrome/browser/download/download_file_manager.cc

Issue 7134017: Make safe browsing work in a multi-profile environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: addressed sky's nit Created 9 years, 5 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 | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file_manager.cc
===================================================================
--- chrome/browser/download/download_file_manager.cc (revision 92179)
+++ chrome/browser/download/download_file_manager.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/tab_contents/tab_util.h"
+#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/tab_contents.h"
@@ -145,8 +146,9 @@
manager->CreateDownloadItem(info);
#if defined(ENABLE_SAFE_BROWSING)
- bool hash_needed = g_browser_process->safe_browsing_service()->
- DownloadBinHashNeeded();
+ bool hash_needed = manager->profile()->GetPrefs()->GetBoolean(
+ prefs::kSafeBrowsingEnabled) &&
+ g_browser_process->safe_browsing_service()->DownloadBinHashNeeded();
#else
bool hash_needed = false;
#endif
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698