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

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

Issue 2184913005: Add calls to the server to request WebAPK updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and pkotwicz@'s comments. 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_update_manager.h
diff --git a/chrome/browser/android/webapk/webapk_update_manager.h b/chrome/browser/android/webapk/webapk_update_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc7c4fb4974a777ad7fcd0b9924bb80cdcd0bfe1
--- /dev/null
+++ b/chrome/browser/android/webapk/webapk_update_manager.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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.
+
+#ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_
+#define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_
+
+#include "base/android/jni_android.h"
+#include "base/macros.h"
+
+// WebApkUpdateManager is the C++ counterpart of org.chromium.chrome.browser's
+// WebApkUpdateManager in Java. It calls WebApkInstaller to send update request
+// to WebAPK Minting Server.
pkotwicz 2016/08/09 14:35:43 Nits: - "send update request" -> "send an update r
Xi Han 2016/08/11 19:01:15 Done.
+class WebApkUpdateManager {
+ public:
+ // Registers JNI hooks.
+ static bool Register(JNIEnv* env);
+
+ // Called after either a request to update the WebAPK has been sent, or the
+ // creation process of the new WebAPK fails.
pkotwicz 2016/08/09 14:35:43 How about: ", or the creation process of the new W
Xi Han 2016/08/11 19:01:15 Done.
+ // |success| indicates whether the request was issued to the server. A "true"
+ // value of |success| does not guarantee that the WebAPK will be successfully
+ // installed.
pkotwicz 2016/08/09 14:35:43 Nit: "installed" -> "updated"
Xi Han 2016/08/11 19:01:15 Done.
+ static void OnBuiltWebApk(const std::string& webapk_package, bool success);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(WebApkUpdateManager);
+};
+
+#endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698