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

Side by Side Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 2681783003: Since SafeBrowsingNavigationObserverManager cleans up navigation events every two minutes, if downl… (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/download/chrome_download_manager_delegate.h" 5 #include "chrome/browser/download/chrome_download_manager_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 DCHECK_CURRENTLY_ON(BrowserThread::UI); 655 DCHECK_CURRENTLY_ON(BrowserThread::UI);
656 656
657 #if defined(FULL_SAFE_BROWSING) 657 #if defined(FULL_SAFE_BROWSING)
658 safe_browsing::DownloadProtectionService* service = 658 safe_browsing::DownloadProtectionService* service =
659 GetDownloadProtectionService(); 659 GetDownloadProtectionService();
660 if (service) { 660 if (service) {
661 bool is_content_check_supported = 661 bool is_content_check_supported =
662 service->IsSupportedDownload(*download, suggested_path); 662 service->IsSupportedDownload(*download, suggested_path);
663 DVLOG(2) << __func__ << "() Start SB URL check for download = " 663 DVLOG(2) << __func__ << "() Start SB URL check for download = "
664 << download->DebugString(false); 664 << download->DebugString(false);
665 service->CheckDownloadUrl(*download, 665 service->CheckDownloadUrl(download,
666 base::Bind(&CheckDownloadUrlDone, 666 base::Bind(&CheckDownloadUrlDone,
667 callback, 667 callback,
668 is_content_check_supported)); 668 is_content_check_supported));
669 return; 669 return;
670 } 670 }
671 #endif 671 #endif
672 callback.Run(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS); 672 callback.Run(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS);
673 } 673 }
674 674
675 void ChromeDownloadManagerDelegate::GetFileMimeType( 675 void ChromeDownloadManagerDelegate::GetFileMimeType(
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 path.MatchesExtension(FILE_PATH_LITERAL(".xht")) || 812 path.MatchesExtension(FILE_PATH_LITERAL(".xht")) ||
813 path.MatchesExtension(FILE_PATH_LITERAL(".xhtm")) || 813 path.MatchesExtension(FILE_PATH_LITERAL(".xhtm")) ||
814 path.MatchesExtension(FILE_PATH_LITERAL(".xhtml")) || 814 path.MatchesExtension(FILE_PATH_LITERAL(".xhtml")) ||
815 path.MatchesExtension(FILE_PATH_LITERAL(".xsl")) || 815 path.MatchesExtension(FILE_PATH_LITERAL(".xsl")) ||
816 path.MatchesExtension(FILE_PATH_LITERAL(".xslt"))) { 816 path.MatchesExtension(FILE_PATH_LITERAL(".xslt"))) {
817 return true; 817 return true;
818 } 818 }
819 #endif 819 #endif
820 return false; 820 return false;
821 } 821 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698