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 // 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_crx_util.h" | 7 #include "chrome/browser/download/download_crx_util.h" |
8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "content/public/browser/download_item.h" | 10 #include "content/public/browser/download_item.h" |
11 | 11 |
12 using content::BrowserThread; | 12 using content::BrowserThread; |
13 using content::DownloadItem; | 13 using content::DownloadItem; |
14 | 14 |
15 namespace download_crx_util { | 15 namespace download_crx_util { |
16 | 16 |
17 void SetMockInstallPromptForTesting(ExtensionInstallPrompt* mock_prompt) { | 17 void SetMockInstallPromptForTesting(ExtensionInstallPrompt* mock_prompt) { |
18 NOTIMPLEMENTED(); | 18 NOTIMPLEMENTED(); |
19 } | 19 } |
20 | 20 |
21 scoped_refptr<CrxInstaller> OpenChromeExtension( | 21 scoped_refptr<extensions::CrxInstaller> OpenChromeExtension( |
22 Profile* profile, | 22 Profile* profile, |
23 const DownloadItem& download_item) { | 23 const DownloadItem& download_item) { |
24 NOTIMPLEMENTED() << "CrxInstaller not implemented on Android"; | 24 NOTIMPLEMENTED() << "CrxInstaller not implemented on Android"; |
25 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(NULL, NULL)); | 25 scoped_refptr<extensions::CrxInstaller> installer( |
| 26 extensions::CrxInstaller::Create(NULL, NULL)); |
26 return installer; | 27 return installer; |
27 } | 28 } |
28 | 29 |
29 bool IsExtensionDownload(const DownloadItem& download_item) { | 30 bool IsExtensionDownload(const DownloadItem& download_item) { |
30 // Extensions are not supported on Android. We want to treat them as | 31 // Extensions are not supported on Android. We want to treat them as |
31 // normal file downloads. | 32 // normal file downloads. |
32 return false; | 33 return false; |
33 } | 34 } |
34 | 35 |
35 } // namespace download_crx_util | 36 } // namespace download_crx_util |
OLD | NEW |