| Index: chrome/browser/android/webapk/webapk_installer.h
|
| diff --git a/chrome/browser/android/webapk/webapk_installer.h b/chrome/browser/android/webapk/webapk_installer.h
|
| index d47d75228d539b788b2933098541c2cca742e5b2..b3c44b70703d86655dedc2747c2bcadf769621d4 100644
|
| --- a/chrome/browser/android/webapk/webapk_installer.h
|
| +++ b/chrome/browser/android/webapk/webapk_installer.h
|
| @@ -32,6 +32,7 @@ namespace webapk {
|
| class WebApk;
|
| }
|
|
|
| +enum class WebApkInstallResult;
|
| class WebApkIconHasher;
|
|
|
| // Talks to Chrome WebAPK server and Google Play to generate a WebAPK on the
|
| @@ -41,9 +42,10 @@ class WebApkInstaller : public net::URLFetcherDelegate {
|
| public:
|
| // Called when the creation/updating of a WebAPK is finished or failed.
|
| // Parameters:
|
| - // - whether the process succeeds.
|
| + // - the result of the installation.
|
| // - the package name of the WebAPK.
|
| - using FinishCallback = base::Callback<void(bool, const std::string&)>;
|
| + using FinishCallback =
|
| + base::Callback<void(WebApkInstallResult, const std::string&)>;
|
|
|
| ~WebApkInstaller() override;
|
|
|
| @@ -91,7 +93,7 @@ class WebApkInstaller : public net::URLFetcherDelegate {
|
| // Called once the installation is complete or failed.
|
| void OnInstallFinished(JNIEnv* env,
|
| const base::android::JavaParamRef<jobject>& obj,
|
| - jboolean success);
|
| + jint result);
|
|
|
| // Creates a WebApk install or update request.
|
| // Should be used only for testing.
|
| @@ -137,7 +139,7 @@ class WebApkInstaller : public net::URLFetcherDelegate {
|
| int version,
|
| const std::string& token);
|
|
|
| - // Called when the request to install the WebAPK is sent to Google Play.
|
| + // Called when the install or update process has completed.
|
| void OnSuccess();
|
|
|
| private:
|
| @@ -227,12 +229,12 @@ class WebApkInstaller : public net::URLFetcherDelegate {
|
| // download times out.
|
| void OnTimeout();
|
|
|
| - // Called if a WebAPK could not be created. WebApkInstaller only tracks the
|
| - // WebAPK creation and the WebAPK download. It does not track the
|
| - // WebAPK installation. OnFailure() is not called if the WebAPK could not be
|
| - // installed.
|
| + // Called if the WebAPK could not be installed or updated.
|
| void OnFailure();
|
|
|
| + // Called when the install or update process has completed or failed.
|
| + void OnResult(WebApkInstallResult result);
|
| +
|
| net::URLRequestContextGetter* request_context_getter_;
|
|
|
| // Sends HTTP request to WebAPK server.
|
|
|