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

Side by Side Diff: chrome/browser/win/jumplist.h

Issue 2868303003: Cancel the next 10 updates if there's a timeout in jumplist updater (Closed)
Patch Set: Update comments and variable names Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/win/jumplist.cc » ('j') | no next file with comments »
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_WIN_JUMPLIST_H_ 5 #ifndef CHROME_BROWSER_WIN_JUMPLIST_H_
6 #define CHROME_BROWSER_WIN_JUMPLIST_H_ 6 #define CHROME_BROWSER_WIN_JUMPLIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 base::string16 app_id_; 225 base::string16 app_id_;
226 226
227 // Timer for requesting delayed updates of the "Most Visited" category of 227 // Timer for requesting delayed updates of the "Most Visited" category of
228 // jumplist. 228 // jumplist.
229 base::OneShotTimer timer_most_visited_; 229 base::OneShotTimer timer_most_visited_;
230 230
231 // Timer for requesting delayed updates of the "Recently Closed" category of 231 // Timer for requesting delayed updates of the "Recently Closed" category of
232 // jumplist. 232 // jumplist.
233 base::OneShotTimer timer_recently_closed_; 233 base::OneShotTimer timer_recently_closed_;
234 234
235 // Number of updates to skip to alleviate the machine when a previous update
236 // was too slow. Updates will be resumed when this reaches 0 again.
237 int updates_to_skip_ = 0;
238
235 // Holds data that can be accessed from multiple threads. 239 // Holds data that can be accessed from multiple threads.
236 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; 240 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_;
237 241
238 // Id of last favicon task. It's used to cancel current task if a new one 242 // Id of last favicon task. It's used to cancel current task if a new one
239 // comes in before it finishes. 243 // comes in before it finishes.
240 base::CancelableTaskTracker::TaskId task_id_; 244 base::CancelableTaskTracker::TaskId task_id_;
241 245
242 // A task runner running tasks to update the JumpList. 246 // A task runner running tasks to update the JumpList.
243 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_; 247 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_;
244 248
245 // A task runner running tasks to delete JumpListIcons directory and 249 // A task runner running tasks to delete JumpListIcons directory and
246 // JumpListIconsOld directory. 250 // JumpListIconsOld directory.
247 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_; 251 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_;
248 252
249 // For callbacks may be run after destruction. 253 // For callbacks may be run after destruction.
250 base::WeakPtrFactory<JumpList> weak_ptr_factory_; 254 base::WeakPtrFactory<JumpList> weak_ptr_factory_;
251 255
252 DISALLOW_COPY_AND_ASSIGN(JumpList); 256 DISALLOW_COPY_AND_ASSIGN(JumpList);
253 }; 257 };
254 258
255 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ 259 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/win/jumplist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698