summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_crx_util_android.cc
blob: 6bdba5b5b315790fea3f2e5c4ec3836da6b30d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Download code which handles CRX files (extensions, themes, apps, ...).

#include "chrome/browser/download/download_crx_util.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/download_item.h"

using content::BrowserThread;
using content::DownloadItem;

namespace download_crx_util {

void SetMockInstallPromptForTesting(ExtensionInstallPrompt* mock_prompt) {
  NOTIMPLEMENTED();
}

scoped_refptr<extensions::CrxInstaller> OpenChromeExtension(
    Profile* profile,
    const DownloadItem& download_item) {
  NOTIMPLEMENTED() << "CrxInstaller not implemented on Android";
  scoped_refptr<extensions::CrxInstaller> installer(
      extensions::CrxInstaller::Create(NULL, NULL));
  return installer;
}

bool IsExtensionDownload(const DownloadItem& download_item) {
  // Extensions are not supported on Android. We want to treat them as
  // normal file downloads.
  return false;
}

bool OffStoreInstallAllowedByPrefs(Profile* profile,
                                   const content::DownloadItem& item) {
  // Extensions are not supported on Android, return the safe default.
  return false;
}

}  // namespace download_crx_util