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

Unified Diff: chrome/browser/android/logo_bridge.cc

Issue 2833473002: Record NTP.LogoShownTime for timely refreshs only (Closed)
Patch Set: Created 3 years, 8 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/logo_bridge.cc
diff --git a/chrome/browser/android/logo_bridge.cc b/chrome/browser/android/logo_bridge.cc
index 8b24611abf5673c2f5d5822656c2494971bc0b04..dfd87e870f64e1d9e6b342fbb3d3f3b4efd603f5 100644
--- a/chrome/browser/android/logo_bridge.cc
+++ b/chrome/browser/android/logo_bridge.cc
@@ -229,7 +229,11 @@ void LogoBridge::GetCurrentLogo(JNIEnv* env,
// Immediately hand out any current cached config.
DoodleConfigReceived(doodle_service_->config(), /*from_cache=*/true);
// Also request a refresh, in case something changed.
- doodle_service_->Refresh();
+ if (!doodle_service_->Refresh()) {
+ // If the request was skipped, tell the observer not to wait for
+ // notification. This ensures that metrics recording accounts for that.
+ Java_LogoObserver_onLogoRefreshSkipped(env, j_logo_observer_);
+ }
} else {
// |observer| is deleted in LogoObserverAndroid::OnObserverRemoved().
LogoObserverAndroid* observer = new LogoObserverAndroid(

Powered by Google App Engine
This is Rietveld 408576698