summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 21:14:11 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 21:14:11 +0000
commit3993c3159b858010f9f38c780f498e28d74d43ce (patch)
tree7cbfcf607b2786623e6d1e5923e8ce0e889bf4fd /chrome
parent718752f446cf0ef6d029e72d9f7c74656a782e09 (diff)
downloadchromium_src-3993c3159b858010f9f38c780f498e28d74d43ce.zip
chromium_src-3993c3159b858010f9f38c780f498e28d74d43ce.tar.gz
chromium_src-3993c3159b858010f9f38c780f498e28d74d43ce.tar.bz2
Check if SafeBrowsingService is enabled in SendSerializedMalwareDetails.
Fixes possible shutdown crash. BUG=126597 TEST=Load a malware page, make sure the "send additional data" checkbox is checked, then quit chrome. Repeat. Review URL: https://chromiumcodereview.appspot.com/10388022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 100f22a..642bf38 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -1209,6 +1209,9 @@ void SafeBrowsingService::ReportSafeBrowsingHitOnIOThread(
void SafeBrowsingService::SendSerializedMalwareDetails(
const std::string& serialized) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ if (!enabled_)
+ return;
+
if (!serialized.empty()) {
DVLOG(1) << "Sending serialized malware details.";
protocol_manager_->ReportMalwareDetails(serialized);