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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc

Issue 2641973003: Implement server-suggested update check backoff (Closed)
Patch Set: 2 Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/banners/app_banner_infobar_delegate_android.h" 5 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 weak_manager_->SendBannerAccepted(event_request_id_); 371 weak_manager_->SendBannerAccepted(event_request_id_);
372 // TODO(mgiuca): Send the appinstalled event for WebAPKs (but just removing 372 // TODO(mgiuca): Send the appinstalled event for WebAPKs (but just removing
373 // this check won't be sufficient). 373 // this check won't be sufficient).
374 if (!is_webapk_) 374 if (!is_webapk_)
375 weak_manager_->OnInstall(); 375 weak_manager_->OnInstall();
376 } 376 }
377 } 377 }
378 378
379 void AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished( 379 void AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished(
380 bool success, 380 bool success,
381 const std::string& webapk_package_name) { 381 const std::string& webapk_package_name,
382 bool less_updates) {
dominickn 2017/02/14 04:13:34 relax_updates
Xi Han 2017/02/14 22:25:46 Done.
382 JNIEnv* env = base::android::AttachCurrentThread(); 383 JNIEnv* env = base::android::AttachCurrentThread();
383 if (!success) { 384 if (!success) {
384 DVLOG(1) << "The WebAPK installation failed."; 385 DVLOG(1) << "The WebAPK installation failed.";
385 Java_AppBannerInfoBarDelegateAndroid_showWebApkInstallFailureToast(env); 386 Java_AppBannerInfoBarDelegateAndroid_showWebApkInstallFailureToast(env);
386 webapk::TrackInstallEvent(webapk::INSTALL_FAILED); 387 webapk::TrackInstallEvent(webapk::INSTALL_FAILED);
387 if (infobar()) 388 if (infobar())
388 infobar()->RemoveSelf(); 389 infobar()->RemoveSelf();
389 return; 390 return;
390 } 391 }
391 392
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 470
470 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK); 471 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK);
471 return true; 472 return true;
472 } 473 }
473 474
474 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) { 475 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) {
475 return RegisterNativesImpl(env); 476 return RegisterNativesImpl(env);
476 } 477 }
477 478
478 } // namespace banners 479 } // namespace banners
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698