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

Side by Side Diff: chrome/browser/android/webapk/webapk_installer.cc

Issue 2409453002: Fix crash on WebAPK startup (Closed)
Patch Set: Merge branch 'master' into startup_crash0 Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/webapk/webapk_installer.h" 5 #include "chrome/browser/android/webapk/webapk_installer.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/path_utils.h" 10 #include "base/android/path_utils.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 478 }
479 if (!success) 479 if (!success)
480 OnFailure(); 480 OnFailure();
481 } 481 }
482 482
483 void WebApkInstaller::OnTimeout() { 483 void WebApkInstaller::OnTimeout() {
484 OnFailure(); 484 OnFailure();
485 } 485 }
486 486
487 void WebApkInstaller::OnSuccess() { 487 void WebApkInstaller::OnSuccess() {
488 FinishCallback callback = finish_callback_; 488 finish_callback_.Run(true, webapk_package_);
489 std::string webapk_package = webapk_package_;
490 delete this; 489 delete this;
491 callback.Run(true, webapk_package);
492 } 490 }
493 491
494 void WebApkInstaller::OnFailure() { 492 void WebApkInstaller::OnFailure() {
495 FinishCallback callback = finish_callback_; 493 finish_callback_.Run(false, webapk_package_);
496 delete this; 494 delete this;
497 callback.Run(false, "");
498 } 495 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698