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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CRX_UTIL_H_ | 7 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CRX_UTIL_H_ |
8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CRX_UTIL_H_ | 8 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CRX_UTIL_H_ |
9 | 9 |
10 #pragma once | 10 #pragma once |
(...skipping 19 matching lines...) Expand all Loading... |
30 void SetMockInstallUIForTesting(ExtensionInstallUI* mock_ui); | 30 void SetMockInstallUIForTesting(ExtensionInstallUI* mock_ui); |
31 | 31 |
32 // Start installing a downloaded item item as a CRX (extension, theme, app, | 32 // Start installing a downloaded item item as a CRX (extension, theme, app, |
33 // ...). The installer does work on the file thread, so the installation | 33 // ...). The installer does work on the file thread, so the installation |
34 // is not complete when this function returns. Returns the object managing | 34 // is not complete when this function returns. Returns the object managing |
35 // the installation. | 35 // the installation. |
36 scoped_refptr<CrxInstaller> OpenChromeExtension( | 36 scoped_refptr<CrxInstaller> OpenChromeExtension( |
37 Profile* profile, | 37 Profile* profile, |
38 const content::DownloadItem& download_item); | 38 const content::DownloadItem& download_item); |
39 | 39 |
| 40 // Returns true if this is an extension download. This also considers user |
| 41 // scripts to be extension downloads, since we convert those automatically. |
| 42 bool IsExtensionDownload(const content::DownloadItem& download_item); |
| 43 |
40 } // namespace download_crx_util | 44 } // namespace download_crx_util |
41 | 45 |
42 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CRX_UTIL_H_ | 46 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CRX_UTIL_H_ |
OLD | NEW |