| OLD | NEW |
| 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/download_shelf_context_menu.h" | 5 #include "chrome/browser/download/download_shelf_context_menu.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.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_item_model.h" | 10 #include "chrome/browser/download/download_item_model.h" |
| 11 #include "chrome/browser/download/download_prefs.h" | 11 #include "chrome/browser/download/download_prefs.h" |
| 12 #include "chrome/browser/safe_browsing/download_feedback_service.h" | 12 #include "chrome/browser/safe_browsing/download_feedback_service.h" |
| 13 #include "chrome/browser/safe_browsing/download_protection_service.h" | 13 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 15 #include "chrome/common/extensions/extension.h" | |
| 16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 17 #include "content/public/browser/download_item.h" | 16 #include "content/public/browser/download_item.h" |
| 18 #include "content/public/browser/download_manager.h" | 17 #include "content/public/browser/download_manager.h" |
| 19 #include "content/public/browser/page_navigator.h" | 18 #include "content/public/browser/page_navigator.h" |
| 20 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 20 #include "extensions/common/extension.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 23 | 23 |
| 24 using content::DownloadItem; | 24 using content::DownloadItem; |
| 25 using extensions::Extension; | 25 using extensions::Extension; |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Returns true if downloads resumption is enabled. | 29 // Returns true if downloads resumption is enabled. |
| 30 bool IsDownloadResumptionEnabled() { | 30 bool IsDownloadResumptionEnabled() { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 DownloadItemModel download_model(download_item_); | 368 DownloadItemModel download_model(download_item_); |
| 369 if (download_model.ShouldAllowDownloadFeedback()) { | 369 if (download_model.ShouldAllowDownloadFeedback()) { |
| 370 malicious_download_menu_model_->AddItemWithStringId( | 370 malicious_download_menu_model_->AddItemWithStringId( |
| 371 REPORT, IDS_DOWNLOAD_MENU_REPORT); | 371 REPORT, IDS_DOWNLOAD_MENU_REPORT); |
| 372 } | 372 } |
| 373 malicious_download_menu_model_->AddItemWithStringId( | 373 malicious_download_menu_model_->AddItemWithStringId( |
| 374 LEARN_MORE_SCANNING, IDS_DOWNLOAD_MENU_LEARN_MORE_SCANNING); | 374 LEARN_MORE_SCANNING, IDS_DOWNLOAD_MENU_LEARN_MORE_SCANNING); |
| 375 | 375 |
| 376 return malicious_download_menu_model_.get(); | 376 return malicious_download_menu_model_.get(); |
| 377 } | 377 } |
| OLD | NEW |