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

Side by Side Diff: chrome/browser/jumplist_win.h

Issue 11515005: Delay updating jumplist to avoid blocking the file thread at start-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/jumplist_win.cc » ('j') | chrome/browser/jumplist_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/jumplist_win.cc » ('j') | chrome/browser/jumplist_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698