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

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

Issue 2733543002: [Android:WebAPK] Don't add webapp to homescreen if WebAPK install times out part 1/3 (Closed)
Patch Set: Merge branch 'start' into refactor_shortcut_helper3 Created 3 years, 9 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"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "base/task_runner_util.h" 20 #include "base/task_runner_util.h"
21 #include "base/threading/sequenced_worker_pool.h" 21 #include "base/threading/sequenced_worker_pool.h"
22 #include "chrome/browser/android/shortcut_helper.h" 22 #include "chrome/browser/android/shortcut_helper.h"
23 #include "chrome/browser/android/webapk/chrome_webapk_host.h" 23 #include "chrome/browser/android/webapk/chrome_webapk_host.h"
24 #include "chrome/browser/android/webapk/webapk.pb.h" 24 #include "chrome/browser/android/webapk/webapk.pb.h"
25 #include "chrome/browser/android/webapk/webapk_icon_hasher.h" 25 #include "chrome/browser/android/webapk/webapk_icon_hasher.h"
26 #include "chrome/browser/android/webapk/webapk_install_service.h"
26 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
28 #include "components/version_info/version_info.h" 29 #include "components/version_info/version_info.h"
29 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
30 #include "content/public/common/manifest_util.h" 31 #include "content/public/common/manifest_util.h"
31 #include "jni/WebApkInstaller_jni.h" 32 #include "jni/WebApkInstaller_jni.h"
32 #include "net/base/load_flags.h" 33 #include "net/base/load_flags.h"
33 #include "net/http/http_status_code.h" 34 #include "net/http/http_status_code.h"
34 #include "net/traffic_annotation/network_traffic_annotation.h" 35 #include "net/traffic_annotation/network_traffic_annotation.h"
35 #include "net/url_request/url_fetcher.h" 36 #include "net/url_request/url_fetcher.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 265 }
265 266
266 void WebApkInstaller::SetTimeoutMs(int timeout_ms) { 267 void WebApkInstaller::SetTimeoutMs(int timeout_ms) {
267 webapk_download_url_timeout_ms_ = timeout_ms; 268 webapk_download_url_timeout_ms_ = timeout_ms;
268 download_timeout_ms_ = timeout_ms; 269 download_timeout_ms_ = timeout_ms;
269 } 270 }
270 271
271 void WebApkInstaller::OnInstallFinished( 272 void WebApkInstaller::OnInstallFinished(
272 JNIEnv* env, 273 JNIEnv* env,
273 const base::android::JavaParamRef<jobject>& obj, 274 const base::android::JavaParamRef<jobject>& obj,
274 jboolean success) { 275 jint result) {
275 if (success) 276 OnResult(static_cast<WebApkInstallResult>(result));
276 OnSuccess();
277 else
278 OnFailure();
279 } 277 }
280 278
281 void WebApkInstaller::BuildWebApkProtoInBackgroundForTesting( 279 void WebApkInstaller::BuildWebApkProtoInBackgroundForTesting(
282 const base::Callback<void(std::unique_ptr<webapk::WebApk>)>& callback, 280 const base::Callback<void(std::unique_ptr<webapk::WebApk>)>& callback,
283 const std::map<std::string, std::string>& icon_url_to_murmur2_hash, 281 const std::map<std::string, std::string>& icon_url_to_murmur2_hash,
284 bool is_manifest_stale) { 282 bool is_manifest_stale) {
285 base::PostTaskAndReplyWithResult( 283 base::PostTaskAndReplyWithResult(
286 GetBackgroundTaskRunner().get(), FROM_HERE, 284 GetBackgroundTaskRunner().get(), FROM_HERE,
287 base::Bind(&BuildWebApkProtoInBackground, shortcut_info_, shortcut_icon_, 285 base::Bind(&BuildWebApkProtoInBackground, shortcut_info_, shortcut_icon_,
288 icon_url_to_murmur2_hash, is_manifest_stale), 286 icon_url_to_murmur2_hash, is_manifest_stale),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 Java_WebApkInstaller_installWebApkFromGooglePlayAsync( 332 Java_WebApkInstaller_installWebApkFromGooglePlayAsync(
335 env, java_ref_, java_webapk_package, version, java_title, java_token, 333 env, java_ref_, java_webapk_package, version, java_title, java_token,
336 java_url); 334 java_url);
337 } else { 335 } else {
338 Java_WebApkInstaller_updateAsyncFromGooglePlay( 336 Java_WebApkInstaller_updateAsyncFromGooglePlay(
339 env, java_ref_, java_webapk_package, version, java_title, java_token, 337 env, java_ref_, java_webapk_package, version, java_title, java_token,
340 java_url); 338 java_url);
341 } 339 }
342 } 340 }
343 341
342 void WebApkInstaller::OnResult(WebApkInstallResult result) {
343 finish_callback_.Run(result, relax_updates_, webapk_package_);
344 delete this;
345 }
346
344 WebApkInstaller::WebApkInstaller(content::BrowserContext* browser_context, 347 WebApkInstaller::WebApkInstaller(content::BrowserContext* browser_context,
345 const ShortcutInfo& shortcut_info, 348 const ShortcutInfo& shortcut_info,
346 const SkBitmap& shortcut_icon) 349 const SkBitmap& shortcut_icon)
347 : request_context_getter_( 350 : request_context_getter_(
348 Profile::FromBrowserContext(browser_context)->GetRequestContext()), 351 Profile::FromBrowserContext(browser_context)->GetRequestContext()),
349 shortcut_info_(shortcut_info), 352 shortcut_info_(shortcut_info),
350 shortcut_icon_(shortcut_icon), 353 shortcut_icon_(shortcut_icon),
351 server_url_(GetServerUrl()), 354 server_url_(GetServerUrl()),
352 webapk_download_url_timeout_ms_(kWebApkDownloadUrlTimeoutMs), 355 webapk_download_url_timeout_ms_(kWebApkDownloadUrlTimeoutMs),
353 download_timeout_ms_(kDownloadTimeoutMs), 356 download_timeout_ms_(kDownloadTimeoutMs),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 weak_ptr_factory_.GetWeakPtr())); 401 weak_ptr_factory_.GetWeakPtr()));
399 } 402 }
400 403
401 void WebApkInstaller::OnURLFetchComplete(const net::URLFetcher* source) { 404 void WebApkInstaller::OnURLFetchComplete(const net::URLFetcher* source) {
402 timer_.Stop(); 405 timer_.Stop();
403 406
404 if (!source->GetStatus().is_success() || 407 if (!source->GetStatus().is_success() ||
405 source->GetResponseCode() != net::HTTP_OK) { 408 source->GetResponseCode() != net::HTTP_OK) {
406 LOG(WARNING) << base::StringPrintf( 409 LOG(WARNING) << base::StringPrintf(
407 "WebAPK server returned response code %d.", source->GetResponseCode()); 410 "WebAPK server returned response code %d.", source->GetResponseCode());
408 OnFailure(); 411 OnResult(WebApkInstallResult::FAILURE);
409 return; 412 return;
410 } 413 }
411 414
412 std::string response_string; 415 std::string response_string;
413 source->GetResponseAsString(&response_string); 416 source->GetResponseAsString(&response_string);
414 417
415 std::unique_ptr<webapk::WebApkResponse> response(new webapk::WebApkResponse); 418 std::unique_ptr<webapk::WebApkResponse> response(new webapk::WebApkResponse);
416 if (!response->ParseFromString(response_string)) { 419 if (!response->ParseFromString(response_string)) {
417 LOG(WARNING) << "WebAPK server did not return proto."; 420 LOG(WARNING) << "WebAPK server did not return proto.";
418 OnFailure(); 421 OnResult(WebApkInstallResult::FAILURE);
419 return; 422 return;
420 } 423 }
421 424
422 GURL signed_download_url(response->signed_download_url()); 425 GURL signed_download_url(response->signed_download_url());
423 if (task_type_ == UPDATE && signed_download_url.is_empty()) { 426 if (task_type_ == UPDATE && signed_download_url.is_empty()) {
424 // https://crbug.com/680131. The server sends an empty URL if the server 427 // https://crbug.com/680131. The server sends an empty URL if the server
425 // does not have a newer WebAPK to update to. 428 // does not have a newer WebAPK to update to.
426 relax_updates_ = response->relax_updates(); 429 relax_updates_ = response->relax_updates();
427 OnSuccess(); 430 OnResult(WebApkInstallResult::SUCCESS);
428 return; 431 return;
429 } 432 }
430 433
431 if (!signed_download_url.is_valid() || response->package_name().empty()) { 434 if (!signed_download_url.is_valid() || response->package_name().empty()) {
432 LOG(WARNING) << "WebAPK server returned incomplete proto."; 435 LOG(WARNING) << "WebAPK server returned incomplete proto.";
433 OnFailure(); 436 OnResult(WebApkInstallResult::FAILURE);
434 return; 437 return;
435 } 438 }
436 439
437 if (CanUseGooglePlayInstallService()) { 440 if (CanUseGooglePlayInstallService()) {
438 int version = 1; 441 int version = 1;
439 base::StringToInt(response->version(), &version); 442 base::StringToInt(response->version(), &version);
440 InstallOrUpdateWebApkFromGooglePlay(response->package_name(), version, 443 InstallOrUpdateWebApkFromGooglePlay(response->package_name(), version,
441 response->token()); 444 response->token());
442 return; 445 return;
443 } 446 }
444 447
445 OnGotWebApkDownloadUrl(signed_download_url, response->package_name()); 448 OnGotWebApkDownloadUrl(signed_download_url, response->package_name());
446 } 449 }
447 450
448 void WebApkInstaller::DownloadAppIconAndComputeMurmur2Hash() { 451 void WebApkInstaller::DownloadAppIconAndComputeMurmur2Hash() {
449 // Safeguard. WebApkIconHasher crashes if asked to fetch an invalid URL. 452 // Safeguard. WebApkIconHasher crashes if asked to fetch an invalid URL.
450 if (!shortcut_info_.best_primary_icon_url.is_valid()) { 453 if (!shortcut_info_.best_primary_icon_url.is_valid()) {
451 OnFailure(); 454 OnResult(WebApkInstallResult::FAILURE);
452 return; 455 return;
453 } 456 }
454 457
455 timer_.Start( 458 timer_.Start(
456 FROM_HERE, base::TimeDelta::FromMilliseconds(download_timeout_ms_), 459 FROM_HERE, base::TimeDelta::FromMilliseconds(download_timeout_ms_),
457 base::Bind(&WebApkInstaller::OnTimeout, weak_ptr_factory_.GetWeakPtr())); 460 base::Bind(&WebApkInstaller::OnResult, weak_ptr_factory_.GetWeakPtr(),
461 WebApkInstallResult::FAILURE));
458 462
459 icon_hasher_.reset(new WebApkIconHasher()); 463 icon_hasher_.reset(new WebApkIconHasher());
460 icon_hasher_->DownloadAndComputeMurmur2Hash( 464 icon_hasher_->DownloadAndComputeMurmur2Hash(
461 request_context_getter_, shortcut_info_.best_primary_icon_url, 465 request_context_getter_, shortcut_info_.best_primary_icon_url,
462 base::Bind(&WebApkInstaller::OnGotIconMurmur2Hash, 466 base::Bind(&WebApkInstaller::OnGotIconMurmur2Hash,
463 weak_ptr_factory_.GetWeakPtr())); 467 weak_ptr_factory_.GetWeakPtr()));
464 } 468 }
465 469
466 void WebApkInstaller::OnGotIconMurmur2Hash( 470 void WebApkInstaller::OnGotIconMurmur2Hash(
467 const std::string& icon_murmur2_hash) { 471 const std::string& icon_murmur2_hash) {
468 timer_.Stop(); 472 timer_.Stop();
469 icon_hasher_.reset(); 473 icon_hasher_.reset();
470 474
471 // An empty hash indicates that |icon_hasher_| encountered an error. 475 // An empty hash indicates that |icon_hasher_| encountered an error.
472 if (icon_murmur2_hash.empty()) { 476 if (icon_murmur2_hash.empty()) {
473 OnFailure(); 477 OnResult(WebApkInstallResult::FAILURE);
474 return; 478 return;
475 } 479 }
476 480
477 std::map<std::string, std::string> icon_url_to_murmur2_hash; 481 std::map<std::string, std::string> icon_url_to_murmur2_hash;
478 for (const std::string& icon_url : shortcut_info_.icon_urls) { 482 for (const std::string& icon_url : shortcut_info_.icon_urls) {
479 if (icon_url != shortcut_info_.best_primary_icon_url.spec()) 483 if (icon_url != shortcut_info_.best_primary_icon_url.spec())
480 icon_url_to_murmur2_hash[icon_url] = ""; 484 icon_url_to_murmur2_hash[icon_url] = "";
481 else 485 else
482 icon_url_to_murmur2_hash[icon_url] = icon_murmur2_hash; 486 icon_url_to_murmur2_hash[icon_url] = icon_murmur2_hash;
483 } 487 }
(...skipping 17 matching lines...) Expand all
501 webapk->set_version(std::to_string(webapk_version_)); 505 webapk->set_version(std::to_string(webapk_version_));
502 506
503 SendRequest(std::move(webapk), server_url_); 507 SendRequest(std::move(webapk), server_url_);
504 } 508 }
505 509
506 void WebApkInstaller::SendRequest(std::unique_ptr<webapk::WebApk> request_proto, 510 void WebApkInstaller::SendRequest(std::unique_ptr<webapk::WebApk> request_proto,
507 const GURL& server_url) { 511 const GURL& server_url) {
508 timer_.Start( 512 timer_.Start(
509 FROM_HERE, 513 FROM_HERE,
510 base::TimeDelta::FromMilliseconds(webapk_download_url_timeout_ms_), 514 base::TimeDelta::FromMilliseconds(webapk_download_url_timeout_ms_),
511 base::Bind(&WebApkInstaller::OnTimeout, weak_ptr_factory_.GetWeakPtr())); 515 base::Bind(&WebApkInstaller::OnResult, weak_ptr_factory_.GetWeakPtr(),
516 WebApkInstallResult::FAILURE));
512 517
513 url_fetcher_ = 518 url_fetcher_ =
514 net::URLFetcher::Create(server_url, net::URLFetcher::POST, this); 519 net::URLFetcher::Create(server_url, net::URLFetcher::POST, this);
515 url_fetcher_->SetRequestContext(request_context_getter_); 520 url_fetcher_->SetRequestContext(request_context_getter_);
516 std::string serialized_request; 521 std::string serialized_request;
517 request_proto->SerializeToString(&serialized_request); 522 request_proto->SerializeToString(&serialized_request);
518 url_fetcher_->SetUploadData(kProtoMimeType, serialized_request); 523 url_fetcher_->SetUploadData(kProtoMimeType, serialized_request);
519 url_fetcher_->SetLoadFlags( 524 url_fetcher_->SetLoadFlags(
520 net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SEND_COOKIES | 525 net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SEND_COOKIES |
521 net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_AUTH_DATA); 526 net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_AUTH_DATA);
(...skipping 10 matching lines...) Expand all
532 task_type_ == WebApkInstaller::INSTALL ? "install" : "update", 537 task_type_ == WebApkInstaller::INSTALL ? "install" : "update",
533 package_name), 538 package_name),
534 base::Bind(&WebApkInstaller::OnCreatedSubDirAndSetPermissions, 539 base::Bind(&WebApkInstaller::OnCreatedSubDirAndSetPermissions,
535 weak_ptr_factory_.GetWeakPtr(), download_url)); 540 weak_ptr_factory_.GetWeakPtr(), download_url));
536 } 541 }
537 542
538 void WebApkInstaller::OnCreatedSubDirAndSetPermissions( 543 void WebApkInstaller::OnCreatedSubDirAndSetPermissions(
539 const GURL& download_url, 544 const GURL& download_url,
540 const base::FilePath& output_dir) { 545 const base::FilePath& output_dir) {
541 if (output_dir.empty()) { 546 if (output_dir.empty()) {
542 OnFailure(); 547 OnResult(WebApkInstallResult::FAILURE);
543 return; 548 return;
544 } 549 }
545 550
546 DownloadWebApk(output_dir.AppendASCII(webapk_package_ + ".apk"), download_url, 551 DownloadWebApk(output_dir.AppendASCII(webapk_package_ + ".apk"), download_url,
547 true); 552 true);
548 } 553 }
549 554
550 void WebApkInstaller::DownloadWebApk(const base::FilePath& output_path, 555 void WebApkInstaller::DownloadWebApk(const base::FilePath& output_path,
551 const GURL& download_url, 556 const GURL& download_url,
552 bool retry_if_fails) { 557 bool retry_if_fails) {
553 timer_.Start( 558 timer_.Start(
554 FROM_HERE, base::TimeDelta::FromMilliseconds(download_timeout_ms_), 559 FROM_HERE, base::TimeDelta::FromMilliseconds(download_timeout_ms_),
555 base::Bind(&WebApkInstaller::OnTimeout, weak_ptr_factory_.GetWeakPtr())); 560 base::Bind(&WebApkInstaller::OnResult, weak_ptr_factory_.GetWeakPtr(),
561 WebApkInstallResult::FAILURE));
556 562
557 downloader_.reset(new FileDownloader( 563 downloader_.reset(new FileDownloader(
558 download_url, output_path, true, request_context_getter_, 564 download_url, output_path, true, request_context_getter_,
559 base::Bind(&WebApkInstaller::OnWebApkDownloaded, 565 base::Bind(&WebApkInstaller::OnWebApkDownloaded,
560 weak_ptr_factory_.GetWeakPtr(), output_path, download_url, 566 weak_ptr_factory_.GetWeakPtr(), output_path, download_url,
561 retry_if_fails), 567 retry_if_fails),
562 NO_TRAFFIC_ANNOTATION_YET)); 568 NO_TRAFFIC_ANNOTATION_YET));
563 } 569 }
564 570
565 void WebApkInstaller::OnWebApkDownloaded(const base::FilePath& file_path, 571 void WebApkInstaller::OnWebApkDownloaded(const base::FilePath& file_path,
566 const GURL& download_url, 572 const GURL& download_url,
567 bool retry_if_fails, 573 bool retry_if_fails,
568 FileDownloader::Result result) { 574 FileDownloader::Result result) {
569 timer_.Stop(); 575 timer_.Stop();
570 576
571 if (result != FileDownloader::DOWNLOADED) { 577 if (result != FileDownloader::DOWNLOADED) {
572 if (!retry_if_fails) { 578 if (!retry_if_fails) {
573 OnFailure(); 579 OnResult(WebApkInstallResult::FAILURE);
574 return; 580 return;
575 } 581 }
576 582
577 content::BrowserThread::PostDelayedTask( 583 content::BrowserThread::PostDelayedTask(
578 content::BrowserThread::UI, FROM_HERE, 584 content::BrowserThread::UI, FROM_HERE,
579 base::Bind(&WebApkInstaller::DownloadWebApk, 585 base::Bind(&WebApkInstaller::DownloadWebApk,
580 weak_ptr_factory_.GetWeakPtr(), file_path, download_url, 586 weak_ptr_factory_.GetWeakPtr(), file_path, download_url,
581 false), 587 false),
582 base::TimeDelta::FromSeconds(2)); 588 base::TimeDelta::FromSeconds(2));
583 return; 589 return;
584 } 590 }
585 591
586 int posix_permissions = kWorldReadableFilePermission | 592 int posix_permissions = kWorldReadableFilePermission |
587 base::FILE_PERMISSION_WRITE_BY_USER | 593 base::FILE_PERMISSION_WRITE_BY_USER |
588 base::FILE_PERMISSION_EXECUTE_BY_USER; 594 base::FILE_PERMISSION_EXECUTE_BY_USER;
589 base::PostTaskAndReplyWithResult( 595 base::PostTaskAndReplyWithResult(
590 GetBackgroundTaskRunner().get(), FROM_HERE, 596 GetBackgroundTaskRunner().get(), FROM_HERE,
591 base::Bind(&base::SetPosixFilePermissions, file_path, posix_permissions), 597 base::Bind(&base::SetPosixFilePermissions, file_path, posix_permissions),
592 base::Bind(&WebApkInstaller::OnWebApkMadeWorldReadable, 598 base::Bind(&WebApkInstaller::OnWebApkMadeWorldReadable,
593 weak_ptr_factory_.GetWeakPtr(), file_path)); 599 weak_ptr_factory_.GetWeakPtr(), file_path));
594 } 600 }
595 601
596 void WebApkInstaller::OnWebApkMadeWorldReadable( 602 void WebApkInstaller::OnWebApkMadeWorldReadable(
597 const base::FilePath& file_path, 603 const base::FilePath& file_path,
598 bool change_permission_success) { 604 bool change_permission_success) {
599 if (!change_permission_success) { 605 if (!change_permission_success) {
600 OnFailure(); 606 OnResult(WebApkInstallResult::FAILURE);
601 return; 607 return;
602 } 608 }
603 609
604 JNIEnv* env = base::android::AttachCurrentThread(); 610 JNIEnv* env = base::android::AttachCurrentThread();
605 base::android::ScopedJavaLocalRef<jstring> java_file_path = 611 base::android::ScopedJavaLocalRef<jstring> java_file_path =
606 base::android::ConvertUTF8ToJavaString(env, file_path.value()); 612 base::android::ConvertUTF8ToJavaString(env, file_path.value());
607 if (task_type_ == INSTALL) { 613 if (task_type_ == INSTALL) {
608 base::android::ScopedJavaLocalRef<jstring> java_package_name = 614 base::android::ScopedJavaLocalRef<jstring> java_package_name =
609 base::android::ConvertUTF8ToJavaString(env, webapk_package_); 615 base::android::ConvertUTF8ToJavaString(env, webapk_package_);
610 InstallDownloadedWebApk(env, java_file_path, java_package_name); 616 InstallDownloadedWebApk(env, java_file_path, java_package_name);
611 } else if (task_type_ == UPDATE) { 617 } else if (task_type_ == UPDATE) {
612 UpdateUsingDownloadedWebApk(env, java_file_path); 618 UpdateUsingDownloadedWebApk(env, java_file_path);
613 } 619 }
614 } 620 }
615
616 void WebApkInstaller::OnTimeout() {
617 OnFailure();
618 }
619
620 void WebApkInstaller::OnSuccess() {
621 finish_callback_.Run(true, relax_updates_, webapk_package_);
622 delete this;
623 }
624
625 void WebApkInstaller::OnFailure() {
626 finish_callback_.Run(false, relax_updates_, webapk_package_);
627 delete this;
628 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698