| Index: chrome/browser/extensions/crx_installer.h
|
| diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
|
| index e9541dec8204defc135dbc6dfef30595eab22ef2..802f2a9175bc0b71d67d60fc9756736585e5f98e 100644
|
| --- a/chrome/browser/extensions/crx_installer.h
|
| +++ b/chrome/browser/extensions/crx_installer.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/version.h"
|
| +#include "chrome/browser/extensions/app_host_installer.h"
|
| #include "chrome/browser/extensions/crx_installer_error.h"
|
| #include "chrome/browser/extensions/extension_install_prompt.h"
|
| #include "chrome/browser/extensions/sandboxed_unpacker.h"
|
| @@ -31,7 +32,7 @@ class RequirementsChecker;
|
| //
|
| // Installing a CRX is a multi-step process, including unpacking the crx,
|
| // validating it, prompting the user, and installing. Since many of these
|
| -// steps must occur on the file thread, this class contains a copy of all data
|
| +// steps must occur on the FILE thread, this class contains a copy of all data
|
| // necessary to do its job. (This also minimizes external dependencies for
|
| // easier testing).
|
| //
|
| @@ -214,8 +215,17 @@ class CrxInstaller
|
| // that it is OK to install this extension.
|
| void ConfirmInstall();
|
|
|
| - // Runs on File thread. Install the unpacked extension into the profile and
|
| - // notify the frontend.
|
| + // Runs on FILE thread. Ensures that app is not downgraded. If App Host is
|
| + // not installed, calls installer and posts OnAppHostInstallationComplete()
|
| + // as call back. Else proceeds to CompleteInstall().
|
| + void BeginInstall();
|
| +
|
| + // Runs on FILE thread. Callback function for AppHostInstaller.
|
| + // If not |success|, shows error message. Else proceeds to CompleteInstall().
|
| + void OnAppHostInstallationComplete(bool success);
|
| +
|
| + // Runs on FILE thread. Installs the unpacked extension into the profile and
|
| + // notifies the frontend.
|
| void CompleteInstall();
|
|
|
| // Result reporting.
|
| @@ -306,7 +316,7 @@ class CrxInstaller
|
|
|
| // The client we will work with to do the installation. This can be NULL, in
|
| // which case the install is silent.
|
| - // NOTE: we may be deleted on the file thread. To ensure the UI is deleted on
|
| + // NOTE: we may be deleted on the FILE thread. To ensure the UI is deleted on
|
| // the main thread we don't use a scoped_ptr here.
|
| ExtensionInstallPrompt* client_;
|
|
|
| @@ -359,6 +369,9 @@ class CrxInstaller
|
|
|
| bool has_requirement_errors_;
|
|
|
| + // Helper to install App Host.
|
| + AppHostInstaller app_host_installer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(CrxInstaller);
|
| };
|
|
|
|
|