Chromium Code Reviews| Index: chrome/browser/ui/app_list/arc/arc_app_list_prefs.h |
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h |
| index cc30435a60ca245da93194b22182ee5e2182b738..d185c54edc501a8d4ada551cd66f46aa3075ded7 100644 |
| --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h |
| +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h |
| @@ -244,11 +244,15 @@ class ArcAppListPrefs |
| std::unordered_set<std::string> GetAppsForPackage( |
| const std::string& package_name) const; |
| + bool IsIconRequestRecorded(const std::string& app_id, |
|
khmel
2017/03/15 01:16:56
nit: as commented above please move this to privat
lgcheng
2017/03/15 19:59:31
Done.
|
| + ui::ScaleFactor scale_factor) const; |
| + |
| void SetDefaltAppsReadyCallback(base::Closure callback); |
| void SimulateDefaultAppAvailabilityTimeoutForTesting(); |
| private: |
| friend class ChromeLauncherControllerImplTest; |
| + friend class ArcAppModelBuilderTest; |
| // See the Create methods. |
| ArcAppListPrefs( |
| @@ -369,6 +373,11 @@ class ArcAppListPrefs |
| // some default app is not available yet. |
| void MaybeSetDefaultAppLoadingTimeout(); |
| + // Remove the IconRequestRecord associated with app_id. |
| + void MaybeRemoveIconRequestRecord(const std::string& app_id); |
| + |
| + void ClearIconRequestRecord(); |
| + |
| Profile* const profile_; |
| // Owned by the BrowserContext. |
| @@ -391,6 +400,10 @@ class ArcAppListPrefs |
| // for different scale factor. Scale factor is defined by specific bit |
| // position. |
| std::map<std::string, uint32_t> request_icon_deferred_; |
| + // Keeps record of icon request sent to Android. In each user session, one |
| + // request per app per scale_factor is allowed once. Arc is disabled or the |
| + // app is uninstalled the record will be erased. |
| + std::map<std::string, uint32_t> request_icon_record_; |
|
khmel
2017/03/15 01:16:56
Can we use request_icon_deferred_ for this purpose
lgcheng
2017/03/15 19:59:31
Done.
|
| // True if this preference has been initialized once. |
| bool is_initialized_ = false; |
| // True if apps were restored. |