| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "chrome/browser/extensions/crx_installer.h" | 37 #include "chrome/browser/extensions/crx_installer.h" |
| 38 #include "chrome/browser/extensions/webstore_installer.h" | 38 #include "chrome/browser/extensions/webstore_installer.h" |
| 39 #include "chrome/browser/platform_util.h" | 39 #include "chrome/browser/platform_util.h" |
| 40 #include "chrome/browser/profiles/profile.h" | 40 #include "chrome/browser/profiles/profile.h" |
| 41 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 41 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 42 #include "chrome/browser/ui/browser.h" | 42 #include "chrome/browser/ui/browser.h" |
| 43 #include "chrome/browser/ui/browser_finder.h" | 43 #include "chrome/browser/ui/browser_finder.h" |
| 44 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 44 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
| 45 #include "chrome/common/chrome_constants.h" | 45 #include "chrome/common/chrome_constants.h" |
| 46 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
| 47 #include "components/user_prefs/pref_registry_syncable.h" | 47 #include "components/pref_registry/pref_registry_syncable.h" |
| 48 #include "content/public/browser/download_item.h" | 48 #include "content/public/browser/download_item.h" |
| 49 #include "content/public/browser/download_manager.h" | 49 #include "content/public/browser/download_manager.h" |
| 50 #include "content/public/browser/notification_source.h" | 50 #include "content/public/browser/notification_source.h" |
| 51 #include "content/public/browser/page_navigator.h" | 51 #include "content/public/browser/page_navigator.h" |
| 52 #include "extensions/common/constants.h" | 52 #include "extensions/common/constants.h" |
| 53 #include "net/base/filename_util.h" | 53 #include "net/base/filename_util.h" |
| 54 #include "net/base/mime_util.h" | 54 #include "net/base/mime_util.h" |
| 55 | 55 |
| 56 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
| 57 #include "chrome/browser/chromeos/drive/download_handler.h" | 57 #include "chrome/browser/chromeos/drive/download_handler.h" |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 DownloadItem* item = download_manager_->GetDownload(download_id); | 706 DownloadItem* item = download_manager_->GetDownload(download_id); |
| 707 if (!target_info->target_path.empty() && item && | 707 if (!target_info->target_path.empty() && item && |
| 708 IsOpenInBrowserPreferreredForFile(target_info->target_path) && | 708 IsOpenInBrowserPreferreredForFile(target_info->target_path) && |
| 709 target_info->is_filetype_handled_safely) | 709 target_info->is_filetype_handled_safely) |
| 710 DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); | 710 DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); |
| 711 callback.Run(target_info->target_path, | 711 callback.Run(target_info->target_path, |
| 712 target_info->target_disposition, | 712 target_info->target_disposition, |
| 713 target_info->danger_type, | 713 target_info->danger_type, |
| 714 target_info->intermediate_path); | 714 target_info->intermediate_path); |
| 715 } | 715 } |
| OLD | NEW |