Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/browser/download/download_crx_util_android.cc

Issue 226023003: Create CrxInstaller directly in WebstoreInstaller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android compilation fix (again). Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/download/download_crx_util.cc ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 scoped_refptr<extensions::CrxInstaller> CreateCrxInstaller(
18 Profile* profile,
19 const content::DownloadItem& download_item) {
20 NOTIMPLEMENTED() << "CrxInstaller not implemented on Android";
21 scoped_refptr<extensions::CrxInstaller> installer(
22 extensions::CrxInstaller::CreateSilent(NULL));
23 return installer;
24 }
25
17 void SetMockInstallPromptForTesting(ExtensionInstallPrompt* mock_prompt) { 26 void SetMockInstallPromptForTesting(ExtensionInstallPrompt* mock_prompt) {
18 NOTIMPLEMENTED(); 27 NOTIMPLEMENTED();
19 } 28 }
20 29
21 scoped_refptr<extensions::CrxInstaller> OpenChromeExtension( 30 scoped_refptr<extensions::CrxInstaller> OpenChromeExtension(
22 Profile* profile, 31 Profile* profile,
23 const DownloadItem& download_item) { 32 const DownloadItem& download_item) {
24 NOTIMPLEMENTED() << "CrxInstaller not implemented on Android"; 33 NOTIMPLEMENTED() << "CrxInstaller not implemented on Android";
25 scoped_refptr<extensions::CrxInstaller> installer( 34 scoped_refptr<extensions::CrxInstaller> installer(
26 extensions::CrxInstaller::CreateSilent(NULL)); 35 extensions::CrxInstaller::CreateSilent(NULL));
27 return installer; 36 return installer;
28 } 37 }
29 38
30 bool IsExtensionDownload(const DownloadItem& download_item) { 39 bool IsExtensionDownload(const DownloadItem& download_item) {
31 // Extensions are not supported on Android. We want to treat them as 40 // Extensions are not supported on Android. We want to treat them as
32 // normal file downloads. 41 // normal file downloads.
33 return false; 42 return false;
34 } 43 }
35 44
36 bool OffStoreInstallAllowedByPrefs(Profile* profile, 45 bool OffStoreInstallAllowedByPrefs(Profile* profile,
37 const content::DownloadItem& item) { 46 const content::DownloadItem& item) {
38 // Extensions are not supported on Android, return the safe default. 47 // Extensions are not supported on Android, return the safe default.
39 return false; 48 return false;
40 } 49 }
41 50
42 } // namespace download_crx_util 51 } // namespace download_crx_util
OLDNEW
« no previous file with comments | « chrome/browser/download/download_crx_util.cc ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698