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

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

Issue 2865133003: Defer syncing TopSites with history until the first tab closure (Closed)
Patch Set: Git pull and fix merge conflicts 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 base::OneShotTimer timer_most_visited_; 240 base::OneShotTimer timer_most_visited_;
241 241
242 // Timer for requesting delayed updates of the "Recently Closed" category of 242 // Timer for requesting delayed updates of the "Recently Closed" category of
243 // jumplist. 243 // jumplist.
244 base::OneShotTimer timer_recently_closed_; 244 base::OneShotTimer timer_recently_closed_;
245 245
246 // Number of updates to skip to alleviate the machine when a previous update 246 // Number of updates to skip to alleviate the machine when a previous update
247 // was too slow. Updates will be resumed when this reaches 0 again. 247 // was too slow. Updates will be resumed when this reaches 0 again.
248 int updates_to_skip_ = 0; 248 int updates_to_skip_ = 0;
249 249
250 // A boolean flag indicating if a session has at least one tab closed.
251 bool has_tab_closed_ = false;
252
250 // Holds data that can be accessed from multiple threads. 253 // Holds data that can be accessed from multiple threads.
251 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_; 254 scoped_refptr<base::RefCountedData<JumpListData>> jumplist_data_;
252 255
253 // The icon file paths of the most visited links and the recently closed links 256 // The icon file paths of the most visited links and the recently closed links
254 // in the current jumplist, indexed by tab url, respectively. 257 // in the current jumplist, indexed by tab url, respectively.
255 // They may only be accessed on update_jumplist_task_runner_. 258 // They may only be accessed on update_jumplist_task_runner_.
256 base::flat_map<std::string, base::FilePath> most_visited_icons_; 259 base::flat_map<std::string, base::FilePath> most_visited_icons_;
257 base::flat_map<std::string, base::FilePath> recently_closed_icons_; 260 base::flat_map<std::string, base::FilePath> recently_closed_icons_;
258 261
259 // Id of last favicon task. It's used to cancel current task if a new one 262 // Id of last favicon task. It's used to cancel current task if a new one
260 // comes in before it finishes. 263 // comes in before it finishes.
261 base::CancelableTaskTracker::TaskId task_id_; 264 base::CancelableTaskTracker::TaskId task_id_;
262 265
263 // A task runner running tasks to update the JumpList. 266 // A task runner running tasks to update the JumpList.
264 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_; 267 scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_;
265 268
266 // A task runner running tasks to delete JumpListIcons directory and 269 // A task runner running tasks to delete JumpListIcons directory and
267 // JumpListIconsOld directory. 270 // JumpListIconsOld directory.
268 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_; 271 scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_;
269 272
270 // For callbacks may be run after destruction. 273 // For callbacks may be run after destruction.
271 base::WeakPtrFactory<JumpList> weak_ptr_factory_; 274 base::WeakPtrFactory<JumpList> weak_ptr_factory_;
272 275
273 DISALLOW_COPY_AND_ASSIGN(JumpList); 276 DISALLOW_COPY_AND_ASSIGN(JumpList);
274 }; 277 };
275 278
276 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ 279 #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