Chromium Code Reviews| 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..e92d421f605df34968437b7fa72af186480dc10a 100644 |
| --- a/chrome/browser/android/logo_bridge.h |
| +++ b/chrome/browser/android/logo_bridge.h |
| @@ -38,8 +38,14 @@ 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) The current doodle was revalidated.. |
|
Marc Treib
2017/04/27 15:22:55
The comment above is now slightly misleading: This
fhorschig
2017/04/28 08:20:07
Gone. Correct, it's not relevant in this context.
|
| + // d) Not having a doodle was revalidated. |
| void GetCurrentLogo( |
| JNIEnv* env, |
| const base::android::JavaParamRef<jobject>& obj, |
| @@ -60,13 +66,13 @@ class LogoBridge : public doodle::DoodleService::Observer { |
| virtual ~LogoBridge(); |
| // doodle::DoodleService::Observer implementation. |
| + void OnDoodleConfigRevalidated() 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, |