| 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/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 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/browser/download/download_status_updater.h" | 27 #include "chrome/browser/download/download_status_updater.h" |
| 28 #include "chrome/browser/download/download_util.h" | 28 #include "chrome/browser/download/download_util.h" |
| 29 #include "chrome/browser/download/save_package_file_picker.h" | 29 #include "chrome/browser/download/save_package_file_picker.h" |
| 30 #include "chrome/browser/extensions/api/downloads/downloads_api.h" | 30 #include "chrome/browser/extensions/api/downloads/downloads_api.h" |
| 31 #include "chrome/browser/extensions/crx_installer.h" | 31 #include "chrome/browser/extensions/crx_installer.h" |
| 32 #include "chrome/browser/extensions/extension_service.h" | 32 #include "chrome/browser/extensions/extension_service.h" |
| 33 #include "chrome/browser/extensions/extension_system.h" | 33 #include "chrome/browser/extensions/extension_system.h" |
| 34 #include "chrome/browser/history/history_service.h" | 34 #include "chrome/browser/history/history_service.h" |
| 35 #include "chrome/browser/history/history_service_factory.h" | 35 #include "chrome/browser/history/history_service_factory.h" |
| 36 #include "chrome/browser/platform_util.h" | 36 #include "chrome/browser/platform_util.h" |
| 37 #include "chrome/browser/prefs/pref_registry_syncable.h" | |
| 38 #include "chrome/browser/profiles/profile.h" | 37 #include "chrome/browser/profiles/profile.h" |
| 39 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 38 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 40 #include "chrome/browser/ui/browser.h" | 39 #include "chrome/browser/ui/browser.h" |
| 41 #include "chrome/browser/ui/host_desktop.h" | 40 #include "chrome/browser/ui/host_desktop.h" |
| 42 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 41 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 43 #include "chrome/common/chrome_notification_types.h" | 42 #include "chrome/common/chrome_notification_types.h" |
| 44 #include "chrome/common/extensions/feature_switch.h" | 43 #include "chrome/common/extensions/feature_switch.h" |
| 45 #include "chrome/common/extensions/user_script.h" | 44 #include "chrome/common/extensions/user_script.h" |
| 46 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
| 46 #include "components/user_prefs/pref_registry_syncable.h" |
| 47 #include "content/public/browser/download_item.h" | 47 #include "content/public/browser/download_item.h" |
| 48 #include "content/public/browser/download_manager.h" | 48 #include "content/public/browser/download_manager.h" |
| 49 #include "content/public/browser/notification_source.h" | 49 #include "content/public/browser/notification_source.h" |
| 50 #include "content/public/browser/web_contents.h" | 50 #include "content/public/browser/web_contents.h" |
| 51 #include "content/public/browser/web_contents_delegate.h" | 51 #include "content/public/browser/web_contents_delegate.h" |
| 52 #include "grit/generated_resources.h" | 52 #include "grit/generated_resources.h" |
| 53 #include "net/base/net_util.h" | 53 #include "net/base/net_util.h" |
| 54 #include "ui/base/l10n/l10n_util.h" | 54 #include "ui/base/l10n/l10n_util.h" |
| 55 | 55 |
| 56 #if !defined(OS_ANDROID) | 56 #if !defined(OS_ANDROID) |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 // TODO(asanka): This logic is a hack. DownloadFilePicker should give us a | 812 // TODO(asanka): This logic is a hack. DownloadFilePicker should give us a |
| 813 // directory to persist. Or perhaps, if the Drive path | 813 // directory to persist. Or perhaps, if the Drive path |
| 814 // substitution logic is moved here, then we would have a | 814 // substitution logic is moved here, then we would have a |
| 815 // persistable path after the DownloadFilePicker is done. | 815 // persistable path after the DownloadFilePicker is done. |
| 816 if (disposition == DownloadItem::TARGET_DISPOSITION_PROMPT && | 816 if (disposition == DownloadItem::TARGET_DISPOSITION_PROMPT && |
| 817 !download->IsTemporary()) | 817 !download->IsTemporary()) |
| 818 last_download_path_ = target_path.DirName(); | 818 last_download_path_ = target_path.DirName(); |
| 819 } | 819 } |
| 820 callback.Run(target_path, disposition, danger_type, intermediate_path); | 820 callback.Run(target_path, disposition, danger_type, intermediate_path); |
| 821 } | 821 } |
| OLD | NEW |