Override server-side simple-cache trial with commandline switches.
[chromium-blink-merge.git] / chrome / browser / download / download_crx_util_android.cc
blob6bdba5b5b315790fea3f2e5c4ec3836da6b30d7c
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
3 // found in the LICENSE file.
4 //
5 // Download code which handles CRX files (extensions, themes, apps, ...).
7 #include "chrome/browser/download/download_crx_util.h"
8 #include "chrome/browser/extensions/crx_installer.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/download_item.h"
12 using content::BrowserThread;
13 using content::DownloadItem;
15 namespace download_crx_util {
17 void SetMockInstallPromptForTesting(ExtensionInstallPrompt* mock_prompt) {
18 NOTIMPLEMENTED();
21 scoped_refptr<extensions::CrxInstaller> OpenChromeExtension(
22 Profile* profile,
23 const DownloadItem& download_item) {
24 NOTIMPLEMENTED() << "CrxInstaller not implemented on Android";
25 scoped_refptr<extensions::CrxInstaller> installer(
26 extensions::CrxInstaller::Create(NULL, NULL));
27 return installer;
30 bool IsExtensionDownload(const DownloadItem& download_item) {
31 // Extensions are not supported on Android. We want to treat them as
32 // normal file downloads.
33 return false;
36 bool OffStoreInstallAllowedByPrefs(Profile* profile,
37 const content::DownloadItem& item) {
38 // Extensions are not supported on Android, return the safe default.
39 return false;
42 } // namespace download_crx_util