Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: chrome/browser/android/webapk/webapk_installer.h

Issue 2259553002: Make AppBannerInfoBar install WebAPK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 8c1f3d8855442b8110d273a4c2c13f5695087511..df30299224fa485f19f05418a44124cd1d4998f3 100644
--- a/chrome/browser/android/webapk/webapk_installer.h
+++ b/chrome/browser/android/webapk/webapk_installer.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
+#include "chrome/browser/android/shortcut_helper.h"
#include "chrome/browser/android/shortcut_info.h"
#include "chrome/browser/net/file_downloader.h"
#include "net/url_request/url_fetcher.h"
@@ -51,13 +52,16 @@ class WebApkInstaller : public net::URLFetcherDelegate {
// Talks to the Chrome WebAPK server to generate a WebAPK on the server and to
// Google Play to install the downloaded WebAPK. Calls |callback| after the
// request to install the WebAPK is sent to Google Play.
- void InstallAsync(content::BrowserContext* browser_context,
- const FinishCallback& callback);
+ void InstallAsync(
+ content::BrowserContext* browser_context,
+ const ShortcutHelper::WebApkPackageNameAvailableCallback& callback,
+ const FinishCallback& finish_callback);
// Same as InstallAsync() but uses the passed in |request_context_getter|.
void InstallAsyncWithURLRequestContextGetter(
net::URLRequestContextGetter* request_context_getter,
- const FinishCallback& callback);
+ const ShortcutHelper::WebApkPackageNameAvailableCallback& callback,
+ const FinishCallback& finish_callback);
// Talks to the Chrome WebAPK server to update a WebAPK on the server and to
// the Google Play server to install the downloaded WebAPK. Calls |callback|
@@ -183,6 +187,11 @@ class WebApkInstaller : public net::URLFetcherDelegate {
// Callback to call once WebApkInstaller succeeds or fails.
FinishCallback finish_callback_;
+ // Callback to call once the WebAPK's package name is available (i.e.,
+ // received from the WebAPK Server).
+ ShortcutHelper::WebApkPackageNameAvailableCallback
+ package_available_callback_;
+
// Web Manifest info.
const ShortcutInfo shortcut_info_;

Powered by Google App Engine
This is Rietveld 408576698