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

Unified Diff: chrome/browser/android/webapk/webapk_installer_unittest.cc

Issue 2259553002: Make AppBannerInfoBar install WebAPK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. 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_unittest.cc
diff --git a/chrome/browser/android/webapk/webapk_installer_unittest.cc b/chrome/browser/android/webapk/webapk_installer_unittest.cc
index 0231684ca8845d6a97fb13a4a08752c5073b55ca..9c4891732717410134474d67c4e1011292032374 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -66,6 +66,7 @@ class TestWebApkInstaller : public WebApkInstaller {
JNIEnv* env,
const base::android::ScopedJavaLocalRef<jstring>& file_path,
const base::android::ScopedJavaLocalRef<jstring>& package_name) override {
+ PostTaskToRunSuccessCallback();
return true;
}
@@ -73,9 +74,16 @@ class TestWebApkInstaller : public WebApkInstaller {
JNIEnv* env,
const base::android::ScopedJavaLocalRef<jstring>& file_path,
const base::android::ScopedJavaLocalRef<jstring>& package_name) override {
+ PostTaskToRunSuccessCallback();
return true;
}
+ void PostTaskToRunSuccessCallback() {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+ base::Bind(&TestWebApkInstaller::OnSuccess, base::Unretained(this)));
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(TestWebApkInstaller);
};
@@ -134,7 +142,7 @@ class WebApkInstallerRunner {
bool success() { return success_; }
private:
- void OnCompleted(bool success) {
+ void OnCompleted(bool success, const std::string& webapk_package) {
success_ = success;
on_completed_callback_.Run();
}

Powered by Google App Engine
This is Rietveld 408576698