OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Download code which handles CRX files (extensions, themes, apps, ...). | 5 // Download code which handles CRX files (extensions, themes, apps, ...). |
6 | 6 |
7 #include "chrome/browser/download/download_item.h" | |
8 #include "chrome/browser/download/download_util.h" | 7 #include "chrome/browser/download/download_util.h" |
9 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
10 #include "chrome/browser/extensions/extension_install_ui.h" | 9 #include "chrome/browser/extensions/extension_install_ui.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 13 #include "content/browser/download/download_item.h" |
14 #include "content/common/notification_service.h" | 14 #include "content/common/notification_service.h" |
15 | 15 |
16 namespace download_crx_util { | 16 namespace download_crx_util { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Hold a mock ExtensionInstallUI object that will be used when the | 20 // Hold a mock ExtensionInstallUI object that will be used when the |
21 // download system opens a CRX. | 21 // download system opens a CRX. |
22 ExtensionInstallUI* mock_install_ui_for_testing = NULL; | 22 ExtensionInstallUI* mock_install_ui_for_testing = NULL; |
23 | 23 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 installer->set_is_gallery_install(is_gallery_download); | 77 installer->set_is_gallery_install(is_gallery_download); |
78 installer->set_allow_silent_install(is_gallery_download); | 78 installer->set_allow_silent_install(is_gallery_download); |
79 installer->set_install_cause(extension_misc::INSTALL_CAUSE_USER_DOWNLOAD); | 79 installer->set_install_cause(extension_misc::INSTALL_CAUSE_USER_DOWNLOAD); |
80 installer->InstallCrx(download_item.full_path()); | 80 installer->InstallCrx(download_item.full_path()); |
81 } | 81 } |
82 | 82 |
83 return installer; | 83 return installer; |
84 } | 84 } |
85 | 85 |
86 } // namespace download_crx_util | 86 } // namespace download_crx_util |
OLD | NEW |