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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/prefs/pref_member.h" | 13 #include "base/prefs/pref_member.h" |
14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
15 #include "base/rand_util.h" | 15 #include "base/rand_util.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/chrome_notification_types.h" | 20 #include "chrome/browser/chrome_notification_types.h" |
21 #include "chrome/browser/download/download_completion_blocker.h" | 21 #include "chrome/browser/download/download_completion_blocker.h" |
22 #include "chrome/browser/download/download_crx_util.h" | 22 #include "chrome/browser/download/download_crx_util.h" |
23 #include "chrome/browser/download/download_file_picker.h" | 23 #include "chrome/browser/download/download_file_picker.h" |
24 #include "chrome/browser/download/download_history.h" | 24 #include "chrome/browser/download/download_history.h" |
25 #include "chrome/browser/download/download_path_reservation_tracker.h" | 25 #include "chrome/browser/download/download_path_reservation_tracker.h" |
26 #include "chrome/browser/download/download_prefs.h" | 26 #include "chrome/browser/download/download_prefs.h" |
27 #include "chrome/browser/download/download_service.h" | 27 #include "chrome/browser/download/download_service.h" |
28 #include "chrome/browser/download/download_service_factory.h" | 28 #include "chrome/browser/download/download_service_factory.h" |
29 #include "chrome/browser/download/download_target_determiner.h" | 29 #include "chrome/browser/download/download_target_determiner.h" |
30 #include "chrome/browser/download/download_util.h" | |
31 #include "chrome/browser/download/save_package_file_picker.h" | 30 #include "chrome/browser/download/save_package_file_picker.h" |
32 #include "chrome/browser/extensions/api/downloads/downloads_api.h" | 31 #include "chrome/browser/extensions/api/downloads/downloads_api.h" |
33 #include "chrome/browser/extensions/crx_installer.h" | 32 #include "chrome/browser/extensions/crx_installer.h" |
34 #include "chrome/browser/platform_util.h" | 33 #include "chrome/browser/platform_util.h" |
35 #include "chrome/browser/profiles/profile.h" | 34 #include "chrome/browser/profiles/profile.h" |
36 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 35 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
37 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
38 #include "chrome/common/pref_names.h" | 37 #include "chrome/common/pref_names.h" |
39 #include "components/user_prefs/pref_registry_syncable.h" | 38 #include "components/user_prefs/pref_registry_syncable.h" |
40 #include "content/public/browser/download_item.h" | 39 #include "content/public/browser/download_item.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 570 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
572 source); | 571 source); |
573 | 572 |
574 scoped_refptr<extensions::CrxInstaller> installer = | 573 scoped_refptr<extensions::CrxInstaller> installer = |
575 content::Source<extensions::CrxInstaller>(source).ptr(); | 574 content::Source<extensions::CrxInstaller>(source).ptr(); |
576 content::DownloadOpenDelayedCallback callback = | 575 content::DownloadOpenDelayedCallback callback = |
577 crx_installers_[installer.get()]; | 576 crx_installers_[installer.get()]; |
578 crx_installers_.erase(installer.get()); | 577 crx_installers_.erase(installer.get()); |
579 callback.Run(installer->did_handle_successfully()); | 578 callback.Run(installer->did_handle_successfully()); |
580 } | 579 } |
OLD | NEW |