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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_database.cc

Issue 6881106: Treat ERR_CONNECTION_CLOSED as end-of-data marker for downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved detection code to URLRequestHttpJob. Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/safe_browsing_database.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 return FilePath(db_filename.value() + kBloomFilterFile); 442 return FilePath(db_filename.value() + kBloomFilterFile);
443 } 443 }
444 444
445 // static 445 // static
446 FilePath SafeBrowsingDatabase::CsdWhitelistDBFilename( 446 FilePath SafeBrowsingDatabase::CsdWhitelistDBFilename(
447 const FilePath& db_filename) { 447 const FilePath& db_filename) {
448 return FilePath(db_filename.value() + kCsdWhitelistDBFile); 448 return FilePath(db_filename.value() + kCsdWhitelistDBFile);
449 } 449 }
450 450
451 SafeBrowsingStore* SafeBrowsingDatabaseNew::GetStore(const int list_id) { 451 SafeBrowsingStore* SafeBrowsingDatabaseNew::GetStore(const int list_id) {
452 DVLOG(3) << "Get store for list: " << list_id;
Randy Smith (Not in Mondays) 2011/05/03 21:30:41 I doubt this is part of your CL, so you probably d
Scott Hess - ex-Googler 2011/05/03 21:50:29 If this is the log line you refer to in the CC to
ahendrickson 2011/05/04 15:08:25 Since all our debugging happens at VLOG(20), this
453 if (list_id == safe_browsing_util::PHISH || 452 if (list_id == safe_browsing_util::PHISH ||
454 list_id == safe_browsing_util::MALWARE) { 453 list_id == safe_browsing_util::MALWARE) {
455 return browse_store_.get(); 454 return browse_store_.get();
456 } else if (list_id == safe_browsing_util::BINURL || 455 } else if (list_id == safe_browsing_util::BINURL ||
457 list_id == safe_browsing_util::BINHASH) { 456 list_id == safe_browsing_util::BINHASH) {
458 return download_store_.get(); 457 return download_store_.get();
459 } else if (list_id == safe_browsing_util::CSDWHITELIST) { 458 } else if (list_id == safe_browsing_util::CSDWHITELIST) {
460 return csd_whitelist_store_.get(); 459 return csd_whitelist_store_.get();
461 } 460 }
462 return NULL; 461 return NULL;
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 if (std::binary_search(new_csd_whitelist.begin(), new_csd_whitelist.end(), 1307 if (std::binary_search(new_csd_whitelist.begin(), new_csd_whitelist.end(),
1309 kill_switch)) { 1308 kill_switch)) {
1310 // The kill switch is whitelisted hence we whitelist all URLs. 1309 // The kill switch is whitelisted hence we whitelist all URLs.
1311 CsdWhitelistAllUrls(); 1310 CsdWhitelistAllUrls();
1312 } else { 1311 } else {
1313 base::AutoLock locked(lookup_lock_); 1312 base::AutoLock locked(lookup_lock_);
1314 csd_whitelist_all_urls_ = false; 1313 csd_whitelist_all_urls_ = false;
1315 csd_whitelist_.swap(new_csd_whitelist); 1314 csd_whitelist_.swap(new_csd_whitelist);
1316 } 1315 }
1317 } 1316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698