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

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

Issue 2966123002: Log the time interval between adjacent JumpList update notifications (Closed)
Patch Set: Created 3 years, 5 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 | tools/metrics/histograms/histograms.xml » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/win/jumplist.h" 5 #include "chrome/browser/win/jumplist.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 302 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
303 303
304 if (icon_urls_.empty()) 304 if (icon_urls_.empty())
305 PostRunUpdate(); 305 PostRunUpdate();
306 } 306 }
307 307
308 void JumpList::InitializeTimerForUpdate() { 308 void JumpList::InitializeTimerForUpdate() {
309 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 309 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
310 310
311 if (timer_.IsRunning()) { 311 if (timer_.IsRunning()) {
312 // TODO(chengx): Remove the UMA histogram below after fixing crbug/733034.
313 UMA_HISTOGRAM_COUNTS_10000(
314 "WinJumplist.NotificationTimeInterval",
315 (timer_.desired_run_time() - base::TimeTicks::Now()).InMilliseconds());
312 timer_.Reset(); 316 timer_.Reset();
313 } else { 317 } else {
314 // base::Unretained is safe since |this| is guaranteed to outlive timer_. 318 // base::Unretained is safe since |this| is guaranteed to outlive timer_.
315 timer_.Start(FROM_HERE, kDelayForJumplistUpdate, 319 timer_.Start(FROM_HERE, kDelayForJumplistUpdate,
316 base::Bind(&JumpList::OnDelayTimer, base::Unretained(this))); 320 base::Bind(&JumpList::OnDelayTimer, base::Unretained(this)));
317 } 321 }
318 } 322 }
319 323
320 void JumpList::OnDelayTimer() { 324 void JumpList::OnDelayTimer() {
321 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 325 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 const URLIconCache& icons_cache) { 867 const URLIconCache& icons_cache) {
864 // Put all cached icon file paths into a set. 868 // Put all cached icon file paths into a set.
865 base::flat_set<base::FilePath> cached_files; 869 base::flat_set<base::FilePath> cached_files;
866 cached_files.reserve(icons_cache.size()); 870 cached_files.reserve(icons_cache.size());
867 871
868 for (const auto& url_path_pair : icons_cache) 872 for (const auto& url_path_pair : icons_cache)
869 cached_files.insert(url_path_pair.second); 873 cached_files.insert(url_path_pair.second);
870 874
871 DeleteNonCachedFiles(icon_dir, cached_files); 875 DeleteNonCachedFiles(icon_dir, cached_files);
872 } 876 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698