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

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

Issue 1124433005: Introduce timeout for downloading a favicon for adding to Home screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dialog
Patch Set: Rebasing Created 5 years, 7 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/shortcut_data_fetcher.h
diff --git a/chrome/browser/android/shortcut_data_fetcher.h b/chrome/browser/android/shortcut_data_fetcher.h
index a0430faa6c32b9068e152378163fdc209be15ccc..f802717bdcca726b4ec90fde1ce4faeef41b7ec3 100644
--- a/chrome/browser/android/shortcut_data_fetcher.h
+++ b/chrome/browser/android/shortcut_data_fetcher.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/task/cancelable_task_tracker.h"
+#include "base/timer/timer.h"
#include "chrome/browser/android/shortcut_info.h"
#include "chrome/common/web_application_info.h"
#include "components/favicon_base/favicon_types.h"
@@ -89,15 +90,18 @@ class ShortcutDataFetcher
const std::vector<gfx::Size>& sizes);
// Notifies the observer that the shortcut data is all available.
- void NotifyObserver();
+ void NotifyObserver(const SkBitmap& icon);
Observer* weak_observer_;
bool is_waiting_for_web_application_info_;
bool is_ready_;
+ base::Timer icon_timeout_timer_;
ShortcutInfo shortcut_info_;
+
+ // The icon must only be set on the UI thread for thread safety.
SkBitmap shortcut_icon_;
- base::CancelableTaskTracker cancelable_task_tracker_;
+ base::CancelableTaskTracker favicon_task_tracker_;
const int preferred_icon_size_in_px_;
static const int kPreferredIconSizeInDp;
« no previous file with comments | « no previous file | chrome/browser/android/shortcut_data_fetcher.cc » ('j') | chrome/browser/android/shortcut_data_fetcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698