| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ | 5 #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ |
| 6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ | 6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 void RunUpdate(); | 197 void RunUpdate(); |
| 198 | 198 |
| 199 // Helper method for RunUpdate to create icon files for the asynchrounously | 199 // Helper method for RunUpdate to create icon files for the asynchrounously |
| 200 // loaded icons. | 200 // loaded icons. |
| 201 void CreateIconFiles(const ShellLinkItemList& item_list); | 201 void CreateIconFiles(const ShellLinkItemList& item_list); |
| 202 | 202 |
| 203 private: | 203 private: |
| 204 friend struct content::BrowserThread::DeleteOnThread< | 204 friend struct content::BrowserThread::DeleteOnThread< |
| 205 content::BrowserThread::UI>; | 205 content::BrowserThread::UI>; |
| 206 friend class base::DeleteHelper<JumpList>; | 206 friend class base::DeleteHelper<JumpList>; |
| 207 enum UpdateStatus { |
| 208 UPDATE_NOT_RUN = 0, |
| 209 UPDATE_PENDING = 1, |
| 210 NONE_PENDING = 2 |
| 211 }; |
| 212 |
| 207 ~JumpList(); | 213 ~JumpList(); |
| 208 | 214 |
| 209 // For callbacks may be run after destruction. | 215 // For callbacks may be run after destruction. |
| 210 base::WeakPtrFactory<JumpList> weak_ptr_factory_; | 216 base::WeakPtrFactory<JumpList> weak_ptr_factory_; |
| 211 | 217 |
| 212 // Tracks FaviconService tasks. | 218 // Tracks FaviconService tasks. |
| 213 CancelableTaskTracker cancelable_task_tracker_; | 219 CancelableTaskTracker cancelable_task_tracker_; |
| 214 | 220 |
| 215 // The Profile object is used to listen for events | 221 // The Profile object is used to listen for events |
| 216 Profile* profile_; | 222 Profile* profile_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 237 typedef std::pair<std::string, scoped_refptr<ShellLinkItem> > URLPair; | 243 typedef std::pair<std::string, scoped_refptr<ShellLinkItem> > URLPair; |
| 238 std::list<URLPair> icon_urls_; | 244 std::list<URLPair> icon_urls_; |
| 239 | 245 |
| 240 // Id of last favicon task. It's used to cancel current task if a new one | 246 // Id of last favicon task. It's used to cancel current task if a new one |
| 241 // comes in before it finishes. | 247 // comes in before it finishes. |
| 242 CancelableTaskTracker::TaskId task_id_; | 248 CancelableTaskTracker::TaskId task_id_; |
| 243 | 249 |
| 244 // Lock for most_visited_pages_, recently_closed_pages_, icon_urls_ | 250 // Lock for most_visited_pages_, recently_closed_pages_, icon_urls_ |
| 245 // as they may be used by up to 3 threads. | 251 // as they may be used by up to 3 threads. |
| 246 base::Lock list_lock_; | 252 base::Lock list_lock_; |
| 253 |
| 254 UpdateStatus status_; |
| 247 }; | 255 }; |
| 248 | 256 |
| 249 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ | 257 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ |
| OLD | NEW |