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

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

Issue 2865133003: Defer syncing TopSites with history until the first tab closure (Closed)
Patch Set: Address comments 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') | chrome/browser/win/jumplist.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_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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 base::OneShotTimer timer_most_visited_; 230 base::OneShotTimer timer_most_visited_;
231 231
232 // Timer for requesting delayed updates of the "Recently Closed" category of 232 // Timer for requesting delayed updates of the "Recently Closed" category of
233 // jumplist. 233 // jumplist.
234 base::OneShotTimer timer_recently_closed_; 234 base::OneShotTimer timer_recently_closed_;
235 235
236 // Number of updates to skip to alleviate the machine when a previous update 236 // Number of updates to skip to alleviate the machine when a previous update
237 // was too slow. Updates will be resumed when this reaches 0 again. 237 // was too slow. Updates will be resumed when this reaches 0 again.
238 int updates_to_skip_ = 0; 238 int updates_to_skip_ = 0;
239 239
240 // A boolean flag indicating if a session has at least one tab closed.
241 bool has_tab_closed_ = false;
242
240 // Holds data that can be accessed from multiple threads. 243 // Holds data that can be accessed from multiple threads.
241 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; 244 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_;
242 245
243 // 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
244 // comes in before it finishes. 247 // comes in before it finishes.
245 base::CancelableTaskTracker::TaskId task_id_; 248 base::CancelableTaskTracker::TaskId task_id_;
246 249
247 // A task runner running tasks to update the JumpList. 250 // A task runner running tasks to update the JumpList.
248 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_; 251 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_;
249 252
250 // A task runner running tasks to delete JumpListIcons directory and 253 // A task runner running tasks to delete JumpListIcons directory and
251 // JumpListIconsOld directory. 254 // JumpListIconsOld directory.
252 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_; 255 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_;
253 256
254 // For callbacks may be run after destruction. 257 // For callbacks may be run after destruction.
255 base::WeakPtrFactory<JumpList> weak_ptr_factory_; 258 base::WeakPtrFactory<JumpList> weak_ptr_factory_;
256 259
257 DISALLOW_COPY_AND_ASSIGN(JumpList); 260 DISALLOW_COPY_AND_ASSIGN(JumpList);
258 }; 261 };
259 262
260 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ 263 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/win/jumplist.cc » ('j') | chrome/browser/win/jumplist.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698