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

Unified Diff: chrome/browser/download/download_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
Index: chrome/browser/download/download_manager.cc
===================================================================
--- chrome/browser/download/download_manager.cc (revision 92179)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -37,6 +37,7 @@
#include "chrome/browser/ui/download/download_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -270,7 +271,8 @@
// Create a client to verify download URL with safebrowsing.
// It deletes itself after the callback.
scoped_refptr<DownloadSBClient> sb_client = new DownloadSBClient(
- download_id, download->url_chain(), download->referrer_url());
+ download_id, download->url_chain(), download->referrer_url(),
+ profile_->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled));
sb_client->CheckDownloadUrl(
NewCallback(this, &DownloadManager::CheckDownloadUrlDone));
#else
@@ -673,7 +675,9 @@
scoped_refptr<DownloadSBClient> sb_client =
new DownloadSBClient(download_id,
download->url_chain(),
- download->referrer_url());
+ download->referrer_url(),
+ profile_->GetPrefs()->GetBoolean(
+ prefs::kSafeBrowsingEnabled));
sb_client->CheckDownloadHash(
hash, NewCallback(this, &DownloadManager::CheckDownloadHashDone));
#else
« no previous file with comments | « chrome/browser/download/download_file_manager.cc ('k') | chrome/browser/download/download_safe_browsing_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698