| Index: chrome/browser/extensions/unpacked_installer.cc
|
| diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
|
| index 6d4946cc13b455551bcf0e87fce67be7439b1ec0..a560457efa2aff707b6a9c8c3de3d551e1d3a3bc 100644
|
| --- a/chrome/browser/extensions/unpacked_installer.cc
|
| +++ b/chrome/browser/extensions/unpacked_installer.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/callback.h"
|
| #include "base/file_util.h"
|
| #include "base/strings/string_util.h"
|
| +#include "base/strings/utf_string_conversions.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "chrome/browser/extensions/extension_error_reporter.h"
|
| #include "chrome/browser/extensions/extension_install_prompt.h"
|
| @@ -164,6 +165,34 @@ bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
|
| return true;
|
| }
|
|
|
| +void UnpackedInstaller::LoadFromZipFile(const base::FilePath& zip_path) {
|
| + scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker(
|
| + zip_path,
|
| + Manifest::UNPACKED,
|
| + 0,
|
| + base::FilePath(),
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
|
| + this));
|
| +
|
| + BrowserThread::PostTask(
|
| + BrowserThread::FILE,
|
| + FROM_HERE,
|
| + base::Bind(&SandboxedUnpacker::Start, unpacker.get()));
|
| +}
|
| +
|
| +void UnpackedInstaller::OnUnpackSuccess(
|
| + const base::FilePath& temp_dir,
|
| + const base::FilePath& extension_root,
|
| + const base::DictionaryValue* original_manifest,
|
| + const Extension* extension,
|
| + const SkBitmap& install_icon) {
|
| + Load(extension_root);
|
| +}
|
| +
|
| +void UnpackedInstaller::OnUnpackFailure(const base::string16& error) {
|
| + ReportExtensionLoadError(base::UTF16ToUTF8(error));
|
| +}
|
| +
|
| void UnpackedInstaller::ShowInstallPrompt() {
|
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| if (!service_weak_.get())
|
|
|