| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/download_commands.h" | 5 #include "chrome/browser/download/download_commands.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/download/download_crx_util.h" | 9 #include "chrome/browser/download/download_crx_util.h" |
| 10 #include "chrome/browser/download/download_extensions.h" | 10 #include "chrome/browser/download/download_extensions.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 case DISCARD: | 182 case DISCARD: |
| 183 download_item_->Remove(); | 183 download_item_->Remove(); |
| 184 break; | 184 break; |
| 185 case KEEP: | 185 case KEEP: |
| 186 download_item_->ValidateDangerousDownload(); | 186 download_item_->ValidateDangerousDownload(); |
| 187 break; | 187 break; |
| 188 case LEARN_MORE_SCANNING: { | 188 case LEARN_MORE_SCANNING: { |
| 189 #if defined(FULL_SAFE_BROWSING) | 189 #if defined(FULL_SAFE_BROWSING) |
| 190 using safe_browsing::DownloadProtectionService; | 190 using safe_browsing::DownloadProtectionService; |
| 191 | 191 |
| 192 SafeBrowsingService* sb_service = | 192 safe_browsing::SafeBrowsingService* sb_service = |
| 193 g_browser_process->safe_browsing_service(); | 193 g_browser_process->safe_browsing_service(); |
| 194 DownloadProtectionService* protection_service = | 194 DownloadProtectionService* protection_service = |
| 195 (sb_service ? sb_service->download_protection_service() : nullptr); | 195 (sb_service ? sb_service->download_protection_service() : nullptr); |
| 196 if (protection_service) | 196 if (protection_service) |
| 197 protection_service->ShowDetailsForDownload(*download_item_, | 197 protection_service->ShowDetailsForDownload(*download_item_, |
| 198 GetBrowser()); | 198 GetBrowser()); |
| 199 #else | 199 #else |
| 200 // Should only be getting invoked if we are using safe browsing. | 200 // Should only be getting invoked if we are using safe browsing. |
| 201 NOTREACHED(); | 201 NOTREACHED(); |
| 202 #endif | 202 #endif |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 is_adobe_pdf_reader_up_to_date = | 239 is_adobe_pdf_reader_up_to_date = |
| 240 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); | 240 DownloadTargetDeterminer::IsAdobeReaderUpToDate(); |
| 241 } | 241 } |
| 242 return IsDownloadPdf() && | 242 return IsDownloadPdf() && |
| 243 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date | 243 (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date |
| 244 : true); | 244 : true); |
| 245 #elif defined(OS_MACOSX) || defined(OS_LINUX) | 245 #elif defined(OS_MACOSX) || defined(OS_LINUX) |
| 246 return IsDownloadPdf(); | 246 return IsDownloadPdf(); |
| 247 #endif | 247 #endif |
| 248 } | 248 } |
| OLD | NEW |