Commit 20803e28 authored by Sky Malice's avatar Sky Malice Committed by Commit Bot

Migrate WebApkInstallService::FinishCallback to use OnceCallback.

Also fixed lint errors in modified files.

Bug: 714018
Change-Id: I1a5347e8adab28edabebb386e5e5ef20b6ebe938
Reviewed-on: https://chromium-review.googlesource.com/1117374Reviewed-by: default avatarXi Han <hanxi@chromium.org>
Commit-Queue: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571613}
parent 47da420f
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "chrome/browser/android/webapk/webapk_install_service.h" #include "chrome/browser/android/webapk/webapk_install_service.h"
#include <utility>
#include "base/android/jni_android.h" #include "base/android/jni_android.h"
#include "base/android/jni_string.h" #include "base/android/jni_string.h"
#include "base/bind.h" #include "base/bind.h"
...@@ -60,9 +62,9 @@ void WebApkInstallService::InstallAsync(content::WebContents* web_contents, ...@@ -60,9 +62,9 @@ void WebApkInstallService::InstallAsync(content::WebContents* web_contents,
void WebApkInstallService::UpdateAsync( void WebApkInstallService::UpdateAsync(
const base::FilePath& update_request_path, const base::FilePath& update_request_path,
const FinishCallback& finish_callback) { FinishCallback finish_callback) {
WebApkInstaller::UpdateAsync(browser_context_, update_request_path, WebApkInstaller::UpdateAsync(browser_context_, update_request_path,
finish_callback); std::move(finish_callback));
} }
void WebApkInstallService::OnFinishedInstall( void WebApkInstallService::OnFinishedInstall(
......
...@@ -54,7 +54,7 @@ class WebApkInstallService : public KeyedService { ...@@ -54,7 +54,7 @@ class WebApkInstallService : public KeyedService {
// from the WebAPK server. // from the WebAPK server.
// - the package name of the WebAPK. // - the package name of the WebAPK.
using FinishCallback = using FinishCallback =
base::Callback<void(WebApkInstallResult, bool, const std::string&)>; base::OnceCallback<void(WebApkInstallResult, bool, const std::string&)>;
static WebApkInstallService* Get(content::BrowserContext* browser_context); static WebApkInstallService* Get(content::BrowserContext* browser_context);
...@@ -78,7 +78,7 @@ class WebApkInstallService : public KeyedService { ...@@ -78,7 +78,7 @@ class WebApkInstallService : public KeyedService {
// |update_request_path| is the path of the file with the update request. // |update_request_path| is the path of the file with the update request.
// Calls |finish_callback| once the update completed or failed. // Calls |finish_callback| once the update completed or failed.
void UpdateAsync(const base::FilePath& update_request_path, void UpdateAsync(const base::FilePath& update_request_path,
const FinishCallback& finish_callback); FinishCallback finish_callback);
private: private:
// Observes the lifetime of a WebContents. // Observes the lifetime of a WebContents.
......
...@@ -312,20 +312,20 @@ void WebApkInstaller::InstallAsync(content::BrowserContext* context, ...@@ -312,20 +312,20 @@ void WebApkInstaller::InstallAsync(content::BrowserContext* context,
const ShortcutInfo& shortcut_info, const ShortcutInfo& shortcut_info,
const SkBitmap& primary_icon, const SkBitmap& primary_icon,
const SkBitmap& badge_icon, const SkBitmap& badge_icon,
const FinishCallback& finish_callback) { FinishCallback finish_callback) {
// The installer will delete itself when it is done. // The installer will delete itself when it is done.
WebApkInstaller* installer = new WebApkInstaller(context); WebApkInstaller* installer = new WebApkInstaller(context);
installer->InstallAsync(shortcut_info, primary_icon, badge_icon, installer->InstallAsync(shortcut_info, primary_icon, badge_icon,
finish_callback); std::move(finish_callback));
} }
// static // static
void WebApkInstaller::UpdateAsync(content::BrowserContext* context, void WebApkInstaller::UpdateAsync(content::BrowserContext* context,
const base::FilePath& update_request_path, const base::FilePath& update_request_path,
const FinishCallback& finish_callback) { FinishCallback finish_callback) {
// The installer will delete itself when it is done. // The installer will delete itself when it is done.
WebApkInstaller* installer = new WebApkInstaller(context); WebApkInstaller* installer = new WebApkInstaller(context);
installer->UpdateAsync(update_request_path, finish_callback); installer->UpdateAsync(update_request_path, std::move(finish_callback));
} }
// static // static
...@@ -333,16 +333,17 @@ void WebApkInstaller::InstallAsyncForTesting(WebApkInstaller* installer, ...@@ -333,16 +333,17 @@ void WebApkInstaller::InstallAsyncForTesting(WebApkInstaller* installer,
const ShortcutInfo& shortcut_info, const ShortcutInfo& shortcut_info,
const SkBitmap& primary_icon, const SkBitmap& primary_icon,
const SkBitmap& badge_icon, const SkBitmap& badge_icon,
const FinishCallback& callback) { FinishCallback callback) {
installer->InstallAsync(shortcut_info, primary_icon, badge_icon, callback); installer->InstallAsync(shortcut_info, primary_icon, badge_icon,
std::move(callback));
} }
// static // static
void WebApkInstaller::UpdateAsyncForTesting( void WebApkInstaller::UpdateAsyncForTesting(
WebApkInstaller* installer, WebApkInstaller* installer,
const base::FilePath& update_request_path, const base::FilePath& update_request_path,
const FinishCallback& finish_callback) { FinishCallback finish_callback) {
installer->UpdateAsync(update_request_path, finish_callback); installer->UpdateAsync(update_request_path, std::move(finish_callback));
} }
void WebApkInstaller::SetTimeoutMs(int timeout_ms) { void WebApkInstaller::SetTimeoutMs(int timeout_ms) {
...@@ -365,13 +366,14 @@ void WebApkInstaller::BuildProto( ...@@ -365,13 +366,14 @@ void WebApkInstaller::BuildProto(
const std::string& version, const std::string& version,
const std::map<std::string, std::string>& icon_url_to_murmur2_hash, const std::map<std::string, std::string>& icon_url_to_murmur2_hash,
bool is_manifest_stale, bool is_manifest_stale,
const base::Callback<void(std::unique_ptr<std::string>)>& callback) { base::OnceCallback<void(std::unique_ptr<std::string>)> callback) {
base::PostTaskAndReplyWithResult( base::PostTaskAndReplyWithResult(
GetBackgroundTaskRunner().get(), FROM_HERE, GetBackgroundTaskRunner().get(), FROM_HERE,
base::Bind(&BuildProtoInBackground, shortcut_info, primary_icon, base::BindOnce(&BuildProtoInBackground, shortcut_info, primary_icon,
badge_icon, package_name, version, icon_url_to_murmur2_hash, badge_icon, package_name, version,
is_manifest_stale, WebApkUpdateReason::NONE), icon_url_to_murmur2_hash, is_manifest_stale,
callback); WebApkUpdateReason::NONE),
std::move(callback));
} }
// static // static
...@@ -385,13 +387,14 @@ void WebApkInstaller::StoreUpdateRequestToFile( ...@@ -385,13 +387,14 @@ void WebApkInstaller::StoreUpdateRequestToFile(
const std::map<std::string, std::string>& icon_url_to_murmur2_hash, const std::map<std::string, std::string>& icon_url_to_murmur2_hash,
bool is_manifest_stale, bool is_manifest_stale,
WebApkUpdateReason update_reason, WebApkUpdateReason update_reason,
const base::Callback<void(bool)> callback) { base::OnceCallback<void(bool)> callback) {
base::PostTaskAndReplyWithResult( base::PostTaskAndReplyWithResult(
GetBackgroundTaskRunner().get(), FROM_HERE, GetBackgroundTaskRunner().get(), FROM_HERE,
base::Bind(&StoreUpdateRequestToFileInBackground, update_request_path, base::BindOnce(&StoreUpdateRequestToFileInBackground, update_request_path,
shortcut_info, primary_icon, badge_icon, package_name, version, shortcut_info, primary_icon, badge_icon, package_name,
icon_url_to_murmur2_hash, is_manifest_stale, update_reason), version, icon_url_to_murmur2_hash, is_manifest_stale,
callback); update_reason),
std::move(callback));
} }
void WebApkInstaller::InstallOrUpdateWebApk(const std::string& package_name, void WebApkInstaller::InstallOrUpdateWebApk(const std::string& package_name,
...@@ -422,7 +425,7 @@ void WebApkInstaller::InstallOrUpdateWebApk(const std::string& package_name, ...@@ -422,7 +425,7 @@ void WebApkInstaller::InstallOrUpdateWebApk(const std::string& package_name,
void WebApkInstaller::OnResult(WebApkInstallResult result) { void WebApkInstaller::OnResult(WebApkInstallResult result) {
weak_ptr_factory_.InvalidateWeakPtrs(); weak_ptr_factory_.InvalidateWeakPtrs();
finish_callback_.Run(result, relax_updates_, webapk_package_); std::move(finish_callback_).Run(result, relax_updates_, webapk_package_);
if (task_type_ == WebApkInstaller::INSTALL) { if (task_type_ == WebApkInstaller::INSTALL) {
if (result == WebApkInstallResult::SUCCESS) { if (result == WebApkInstallResult::SUCCESS) {
...@@ -456,14 +459,14 @@ void WebApkInstaller::CreateJavaRef() { ...@@ -456,14 +459,14 @@ void WebApkInstaller::CreateJavaRef() {
void WebApkInstaller::InstallAsync(const ShortcutInfo& shortcut_info, void WebApkInstaller::InstallAsync(const ShortcutInfo& shortcut_info,
const SkBitmap& primary_icon, const SkBitmap& primary_icon,
const SkBitmap& badge_icon, const SkBitmap& badge_icon,
const FinishCallback& finish_callback) { FinishCallback finish_callback) {
install_duration_timer_.reset(new base::ElapsedTimer()); install_duration_timer_.reset(new base::ElapsedTimer());
install_shortcut_info_.reset(new ShortcutInfo(shortcut_info)); install_shortcut_info_.reset(new ShortcutInfo(shortcut_info));
install_primary_icon_ = primary_icon; install_primary_icon_ = primary_icon;
install_badge_icon_ = badge_icon; install_badge_icon_ = badge_icon;
short_name_ = shortcut_info.short_name; short_name_ = shortcut_info.short_name;
finish_callback_ = finish_callback; finish_callback_ = std::move(finish_callback);
task_type_ = INSTALL; task_type_ = INSTALL;
CheckFreeSpace(); CheckFreeSpace();
...@@ -498,15 +501,15 @@ void WebApkInstaller::OnGotSpaceStatus( ...@@ -498,15 +501,15 @@ void WebApkInstaller::OnGotSpaceStatus(
} }
void WebApkInstaller::UpdateAsync(const base::FilePath& update_request_path, void WebApkInstaller::UpdateAsync(const base::FilePath& update_request_path,
const FinishCallback& finish_callback) { FinishCallback finish_callback) {
finish_callback_ = finish_callback; finish_callback_ = std::move(finish_callback);
task_type_ = UPDATE; task_type_ = UPDATE;
base::PostTaskAndReplyWithResult( base::PostTaskAndReplyWithResult(
GetBackgroundTaskRunner().get(), FROM_HERE, GetBackgroundTaskRunner().get(), FROM_HERE,
base::Bind(&ReadFileInBackground, update_request_path), base::BindOnce(&ReadFileInBackground, update_request_path),
base::Bind(&WebApkInstaller::OnReadUpdateRequest, base::BindOnce(&WebApkInstaller::OnReadUpdateRequest,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
} }
void WebApkInstaller::OnReadUpdateRequest( void WebApkInstaller::OnReadUpdateRequest(
...@@ -629,8 +632,8 @@ void WebApkInstaller::OnGotBadgeIconMurmur2Hash( ...@@ -629,8 +632,8 @@ void WebApkInstaller::OnGotBadgeIconMurmur2Hash(
BuildProto(*install_shortcut_info_, install_primary_icon_, BuildProto(*install_shortcut_info_, install_primary_icon_,
install_badge_icon_, "" /* package_name */, "" /* version */, install_badge_icon_, "" /* package_name */, "" /* version */,
icon_url_to_murmur2_hash, false /* is_manifest_stale */, icon_url_to_murmur2_hash, false /* is_manifest_stale */,
base::Bind(&WebApkInstaller::SendRequest, base::BindOnce(&WebApkInstaller::SendRequest,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
} }
void WebApkInstaller::SendRequest( void WebApkInstaller::SendRequest(
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <jni.h> #include <jni.h>
#include <map> #include <map>
#include <memory> #include <memory>
#include <string>
#include "base/android/scoped_java_ref.h" #include "base/android/scoped_java_ref.h"
#include "base/callback.h" #include "base/callback.h"
...@@ -58,7 +59,7 @@ class WebApkInstaller : public net::URLFetcherDelegate { ...@@ -58,7 +59,7 @@ class WebApkInstaller : public net::URLFetcherDelegate {
const ShortcutInfo& shortcut_info, const ShortcutInfo& shortcut_info,
const SkBitmap& primary_icon, const SkBitmap& primary_icon,
const SkBitmap& badge_icon, const SkBitmap& badge_icon,
const FinishCallback& finish_callback); FinishCallback finish_callback);
// Creates a self-owned WebApkInstaller instance and talks to the Chrome // Creates a self-owned WebApkInstaller instance and talks to the Chrome
// WebAPK server to update a WebAPK on the server and locally requests the // WebAPK server to update a WebAPK on the server and locally requests the
...@@ -66,7 +67,7 @@ class WebApkInstaller : public net::URLFetcherDelegate { ...@@ -66,7 +67,7 @@ class WebApkInstaller : public net::URLFetcherDelegate {
// |update_request_path| is the path of the file with the update request. // |update_request_path| is the path of the file with the update request.
static void UpdateAsync(content::BrowserContext* context, static void UpdateAsync(content::BrowserContext* context,
const base::FilePath& update_request_path, const base::FilePath& update_request_path,
const FinishCallback& callback); FinishCallback callback);
// Calls the private function |InstallAsync| for testing. // Calls the private function |InstallAsync| for testing.
// Should be used only for testing. // Should be used only for testing.
...@@ -74,13 +75,13 @@ class WebApkInstaller : public net::URLFetcherDelegate { ...@@ -74,13 +75,13 @@ class WebApkInstaller : public net::URLFetcherDelegate {
const ShortcutInfo& shortcut_info, const ShortcutInfo& shortcut_info,
const SkBitmap& primary_icon, const SkBitmap& primary_icon,
const SkBitmap& badge_icon, const SkBitmap& badge_icon,
const FinishCallback& callback); FinishCallback callback);
// Calls the private function |UpdateAsync| for testing. // Calls the private function |UpdateAsync| for testing.
// Should be used only for testing. // Should be used only for testing.
static void UpdateAsyncForTesting(WebApkInstaller* installer, static void UpdateAsyncForTesting(WebApkInstaller* installer,
const base::FilePath& update_request_path, const base::FilePath& update_request_path,
const FinishCallback& callback); FinishCallback callback);
// Sets the timeout for the server requests. // Sets the timeout for the server requests.
void SetTimeoutMs(int timeout_ms); void SetTimeoutMs(int timeout_ms);
...@@ -108,7 +109,7 @@ class WebApkInstaller : public net::URLFetcherDelegate { ...@@ -108,7 +109,7 @@ class WebApkInstaller : public net::URLFetcherDelegate {
const std::string& version, const std::string& version,
const std::map<std::string, std::string>& icon_url_to_murmur2_hash, const std::map<std::string, std::string>& icon_url_to_murmur2_hash,
bool is_manifest_stale, bool is_manifest_stale,
const base::Callback<void(std::unique_ptr<std::string>)>& callback); base::OnceCallback<void(std::unique_ptr<std::string>)> callback);
// Builds the WebAPK proto for an update or an install request and stores it // Builds the WebAPK proto for an update or an install request and stores it
// to |update_request_path|. Runs |callback| with a boolean indicating // to |update_request_path|. Runs |callback| with a boolean indicating
...@@ -123,7 +124,7 @@ class WebApkInstaller : public net::URLFetcherDelegate { ...@@ -123,7 +124,7 @@ class WebApkInstaller : public net::URLFetcherDelegate {
const std::map<std::string, std::string>& icon_url_to_murmur2_hash, const std::map<std::string, std::string>& icon_url_to_murmur2_hash,
bool is_manifest_stale, bool is_manifest_stale,
WebApkUpdateReason update_reason, WebApkUpdateReason update_reason,
const base::Callback<void(bool)> callback); base::OnceCallback<void(bool)> callback);
protected: protected:
explicit WebApkInstaller(content::BrowserContext* browser_context); explicit WebApkInstaller(content::BrowserContext* browser_context);
...@@ -156,14 +157,14 @@ class WebApkInstaller : public net::URLFetcherDelegate { ...@@ -156,14 +157,14 @@ class WebApkInstaller : public net::URLFetcherDelegate {
void InstallAsync(const ShortcutInfo& shortcut_info, void InstallAsync(const ShortcutInfo& shortcut_info,
const SkBitmap& primary_icon, const SkBitmap& primary_icon,
const SkBitmap& badge_icon, const SkBitmap& badge_icon,
const FinishCallback& finish_callback); FinishCallback finish_callback);
// Talks to the Chrome WebAPK server to update a WebAPK on the server and to // Talks to the Chrome WebAPK server to update a WebAPK on the server and to
// the Google Play server to install the downloaded WebAPK. // the Google Play server to install the downloaded WebAPK.
// |update_request_path| is the path of the file with the update request. // |update_request_path| is the path of the file with the update request.
// Calls |finish_callback| once the update completed or failed. // Calls |finish_callback| once the update completed or failed.
void UpdateAsync(const base::FilePath& update_request_path, void UpdateAsync(const base::FilePath& update_request_path,
const FinishCallback& finish_callback); FinishCallback finish_callback);
// Called once there is sufficient space on the user's device to install a // Called once there is sufficient space on the user's device to install a
// WebAPK. The user may already have had sufficient space on their device // WebAPK. The user may already have had sufficient space on their device
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
#include "chrome/browser/android/webapk/webapk_installer.h" #include "chrome/browser/android/webapk/webapk_installer.h"
#include <jni.h> #include <utility>
#include <memory>
#include <string>
#include "base/android/scoped_java_ref.h" #include "base/android/scoped_java_ref.h"
#include "base/bind.h" #include "base/bind.h"
...@@ -116,8 +114,8 @@ class WebApkInstallerRunner { ...@@ -116,8 +114,8 @@ class WebApkInstallerRunner {
info.best_badge_icon_url = best_badge_icon_url_; info.best_badge_icon_url = best_badge_icon_url_;
WebApkInstaller::InstallAsyncForTesting( WebApkInstaller::InstallAsyncForTesting(
CreateWebApkInstaller(), info, SkBitmap(), SkBitmap(), CreateWebApkInstaller(), info, SkBitmap(), SkBitmap(),
base::Bind(&WebApkInstallerRunner::OnCompleted, base::BindOnce(&WebApkInstallerRunner::OnCompleted,
base::Unretained(this))); base::Unretained(this)));
run_loop.Run(); run_loop.Run();
} }
...@@ -128,8 +126,8 @@ class WebApkInstallerRunner { ...@@ -128,8 +126,8 @@ class WebApkInstallerRunner {
WebApkInstaller::UpdateAsyncForTesting( WebApkInstaller::UpdateAsyncForTesting(
CreateWebApkInstaller(), update_request_path, CreateWebApkInstaller(), update_request_path,
base::Bind(&WebApkInstallerRunner::OnCompleted, base::BindOnce(&WebApkInstallerRunner::OnCompleted,
base::Unretained(this))); base::Unretained(this)));
run_loop.Run(); run_loop.Run();
} }
...@@ -183,7 +181,8 @@ class UpdateRequestStorer { ...@@ -183,7 +181,8 @@ class UpdateRequestStorer {
update_request_path, ShortcutInfo((GURL())), SkBitmap(), SkBitmap(), "", update_request_path, ShortcutInfo((GURL())), SkBitmap(), SkBitmap(), "",
"", std::map<std::string, std::string>(), false, "", std::map<std::string, std::string>(), false,
WebApkUpdateReason::PRIMARY_ICON_HASH_DIFFERS, WebApkUpdateReason::PRIMARY_ICON_HASH_DIFFERS,
base::Bind(&UpdateRequestStorer::OnComplete, base::Unretained(this))); base::BindOnce(&UpdateRequestStorer::OnComplete,
base::Unretained(this)));
run_loop.Run(); run_loop.Run();
} }
...@@ -233,8 +232,8 @@ class BuildProtoRunner { ...@@ -233,8 +232,8 @@ class BuildProtoRunner {
WebApkInstaller::BuildProto( WebApkInstaller::BuildProto(
info, primary_icon, badge_icon, "" /* package_name */, "" /* version */, info, primary_icon, badge_icon, "" /* package_name */, "" /* version */,
icon_url_to_murmur2_hash, is_manifest_stale, icon_url_to_murmur2_hash, is_manifest_stale,
base::Bind(&BuildProtoRunner::OnBuiltWebApkProto, base::BindOnce(&BuildProtoRunner::OnBuiltWebApkProto,
base::Unretained(this))); base::Unretained(this)));
base::RunLoop run_loop; base::RunLoop run_loop;
on_completed_callback_ = run_loop.QuitClosure(); on_completed_callback_ = run_loop.QuitClosure();
...@@ -289,7 +288,7 @@ class WebApkInstallerTest : public ::testing::Test { ...@@ -289,7 +288,7 @@ class WebApkInstallerTest : public ::testing::Test {
void SetUp() override { void SetUp() override {
test_server_.AddDefaultHandlers(base::FilePath(kTestDataDir)); test_server_.AddDefaultHandlers(base::FilePath(kTestDataDir));
test_server_.RegisterRequestHandler(base::Bind( test_server_.RegisterRequestHandler(base::BindRepeating(
&WebApkInstallerTest::HandleWebApkRequest, base::Unretained(this))); &WebApkInstallerTest::HandleWebApkRequest, base::Unretained(this)));
ASSERT_TRUE(test_server_.Start()); ASSERT_TRUE(test_server_.Start());
...@@ -439,7 +438,7 @@ BuildUnparsableWebApkResponse() { ...@@ -439,7 +438,7 @@ BuildUnparsableWebApkResponse() {
// Test that an HTTP response which cannot be parsed as a webapk::WebApkResponse // Test that an HTTP response which cannot be parsed as a webapk::WebApkResponse
// is handled properly. // is handled properly.
TEST_F(WebApkInstallerTest, UnparsableCreateWebApkResponse) { TEST_F(WebApkInstallerTest, UnparsableCreateWebApkResponse) {
SetWebApkResponseBuilder(base::Bind(&BuildUnparsableWebApkResponse)); SetWebApkResponseBuilder(base::BindRepeating(&BuildUnparsableWebApkResponse));
std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner(); std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner();
runner->RunInstallWebApk(); runner->RunInstallWebApk();
...@@ -466,7 +465,7 @@ TEST_F(WebApkInstallerTest, UpdateSuccess) { ...@@ -466,7 +465,7 @@ TEST_F(WebApkInstallerTest, UpdateSuccess) {
// - The most up to date version of the WebAPK on the server is identical to the // - The most up to date version of the WebAPK on the server is identical to the
// one installed on the client. // one installed on the client.
TEST_F(WebApkInstallerTest, UpdateSuccessWithEmptyTokenInResponse) { TEST_F(WebApkInstallerTest, UpdateSuccessWithEmptyTokenInResponse) {
SetWebApkResponseBuilder(base::Bind(&BuildValidWebApkResponse, "")); SetWebApkResponseBuilder(base::BindRepeating(&BuildValidWebApkResponse, ""));
ScopedTempFile scoped_file; ScopedTempFile scoped_file;
base::FilePath update_request_path = scoped_file.GetFilePath(); base::FilePath update_request_path = scoped_file.GetFilePath();
......
...@@ -128,8 +128,8 @@ static void JNI_WebApkUpdateManager_StoreWebApkUpdateRequestToFile( ...@@ -128,8 +128,8 @@ static void JNI_WebApkUpdateManager_StoreWebApkUpdateRequestToFile(
base::FilePath(update_request_path), info, primary_icon, badge_icon, base::FilePath(update_request_path), info, primary_icon, badge_icon,
webapk_package, std::to_string(java_webapk_version), webapk_package, std::to_string(java_webapk_version),
icon_url_to_murmur2_hash, java_is_manifest_stale, update_reason, icon_url_to_murmur2_hash, java_is_manifest_stale, update_reason,
base::Bind(&OnStoredUpdateRequest, base::BindOnce(&OnStoredUpdateRequest,
ScopedJavaGlobalRef<jobject>(java_callback))); ScopedJavaGlobalRef<jobject>(java_callback)));
} }
// static JNI method. // static JNI method.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment