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

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

Issue 2833473002: Record NTP.LogoShownTime for timely refreshs only (Closed)
Patch Set: Fix compile error 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.h
diff --git a/chrome/browser/android/logo_bridge.h b/chrome/browser/android/logo_bridge.h
index 89f5f48b12a3ecf1dbc0e09e08098b45d4aee407..99ce2babc472602497a5d27113d25955f22e90ef 100644
--- a/chrome/browser/android/logo_bridge.h
+++ b/chrome/browser/android/logo_bridge.h
@@ -38,8 +38,13 @@ class LogoBridge : public doodle::DoodleService::Observer {
explicit LogoBridge(jobject j_profile);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ // TODO(treib): Double-check the observer contract (esp. for LogoTracker).
// Gets the current non-animated logo (downloading it if necessary) and passes
// it to the observer.
+ // The observer's |onLogoAvailable| is guaranteed to be called at least once:
+ // a) A cached doodle is available.
+ // b) A new doodle is available.
+ // c) Not having a doodle was revalidated.
void GetCurrentLogo(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -60,13 +65,13 @@ class LogoBridge : public doodle::DoodleService::Observer {
virtual ~LogoBridge();
// doodle::DoodleService::Observer implementation.
+ void OnDoodleConfigRevalidated(bool from_cache) override;
void OnDoodleConfigUpdated(
const base::Optional<doodle::DoodleConfig>& maybe_doodle_config) override;
- void DoodleConfigReceived(
- const base::Optional<doodle::DoodleConfig>& maybe_doodle_config,
- bool from_cache);
-
+ void NotifyNoLogoAvailable(bool from_cache);
+ void FetchDoodleImage(const doodle::DoodleConfig& doodle_config,
+ bool from_cache);
void DoodleImageFetched(bool config_from_cache,
const GURL& on_click_url,
const std::string& alt_text,
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ntp/LogoDelegateImpl.java ('k') | chrome/browser/android/logo_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698