OLD | NEW |
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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 if (!success) | 411 if (!success) |
412 OnFailure(); | 412 OnFailure(); |
413 } | 413 } |
414 | 414 |
415 void WebApkInstaller::OnTimeout() { | 415 void WebApkInstaller::OnTimeout() { |
416 OnFailure(); | 416 OnFailure(); |
417 } | 417 } |
418 | 418 |
419 void WebApkInstaller::OnSuccess() { | 419 void WebApkInstaller::OnSuccess() { |
420 FinishCallback callback = finish_callback_; | 420 FinishCallback callback = finish_callback_; |
| 421 std::string webapk_package = webapk_package_; |
421 delete this; | 422 delete this; |
422 callback.Run(true, webapk_package_); | 423 callback.Run(true, webapk_package); |
423 } | 424 } |
424 | 425 |
425 void WebApkInstaller::OnFailure() { | 426 void WebApkInstaller::OnFailure() { |
426 FinishCallback callback = finish_callback_; | 427 FinishCallback callback = finish_callback_; |
427 delete this; | 428 delete this; |
428 callback.Run(false, ""); | 429 callback.Run(false, ""); |
429 } | 430 } |
OLD | NEW |