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

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

Issue 2865133003: Defer syncing TopSites with history until the first tab closure (Closed)
Patch Set: Delay the history sync until 3 tabs are closed rather than 3 recently closed category updates are scheduled 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 base::string16 app_id_; 226 base::string16 app_id_;
227 227
228 // Timer for requesting delayed updates of the "Most Visited" category of 228 // Timer for requesting delayed updates of the "Most Visited" category of
229 // jumplist. 229 // jumplist.
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 // The number of tabs closed after Chrome launches.
237 int tab_closed_count_;
238
239 // A boolean flag indicating if the JumpList "most visited" category has been
240 // updated from the TopSites service.
241 bool initial_most_visited_update_done_;
242
236 // Holds data that can be accessed from multiple threads. 243 // Holds data that can be accessed from multiple threads.
237 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; 244 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_;
238 245
239 // 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
240 // comes in before it finishes. 247 // comes in before it finishes.
241 base::CancelableTaskTracker::TaskId task_id_; 248 base::CancelableTaskTracker::TaskId task_id_;
242 249
243 // A task runner running tasks to update the JumpList. 250 // A task runner running tasks to update the JumpList.
244 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_; 251 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_;
245 252
246 // A task runner running tasks to delete JumpListIcons directory and 253 // A task runner running tasks to delete JumpListIcons directory and
247 // JumpListIconsOld directory. 254 // JumpListIconsOld directory.
248 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_; 255 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_;
249 256
250 // For callbacks may be run after destruction. 257 // For callbacks may be run after destruction.
251 base::WeakPtrFactory<JumpList> weak_ptr_factory_; 258 base::WeakPtrFactory<JumpList> weak_ptr_factory_;
252 259
253 DISALLOW_COPY_AND_ASSIGN(JumpList); 260 DISALLOW_COPY_AND_ASSIGN(JumpList);
254 }; 261 };
255 262
256 #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