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

Side by Side Diff: chrome/browser/metrics/histogram_synchronizer.cc

Issue 9597005: Revert 124890 - Convert uses of int ms to TimeDelta in chrome/browser and net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/metrics/histogram_synchronizer.h" 5 #include "chrome/browser/metrics/histogram_synchronizer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
11 #include "chrome/common/chrome_constants.h" 11 #include "chrome/common/chrome_constants.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 unresponsive_renderer_count); 71 unresponsive_renderer_count);
72 if (!unresponsive_renderer_count) 72 if (!unresponsive_renderer_count)
73 UMA_HISTOGRAM_TIMES("Histogram.FetchRendererHistogramsSynchronously", 73 UMA_HISTOGRAM_TIMES("Histogram.FetchRendererHistogramsSynchronously",
74 TimeTicks::Now() - start); 74 TimeTicks::Now() - start);
75 } 75 }
76 76
77 // static 77 // static
78 void HistogramSynchronizer::FetchRendererHistogramsAsynchronously( 78 void HistogramSynchronizer::FetchRendererHistogramsAsynchronously(
79 MessageLoop* callback_thread, 79 MessageLoop* callback_thread,
80 const base::Closure& callback, 80 const base::Closure& callback,
81 base::TimeDelta wait_time) { 81 int wait_time) {
82 DCHECK(callback_thread != NULL); 82 DCHECK(callback_thread != NULL);
83 DCHECK(!callback.is_null()); 83 DCHECK(!callback.is_null());
84 84
85 HistogramSynchronizer* current_synchronizer = CurrentSynchronizer(); 85 HistogramSynchronizer* current_synchronizer = CurrentSynchronizer();
86 86
87 if (current_synchronizer == NULL) { 87 if (current_synchronizer == NULL) {
88 // System teardown is happening. 88 // System teardown is happening.
89 callback_thread->PostTask(FROM_HERE, callback); 89 callback_thread->PostTask(FROM_HERE, callback);
90 return; 90 return;
91 } 91 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 async_renderers_pending_ = renderer_count; 253 async_renderers_pending_ = renderer_count;
254 } else if (requester == SYNCHRONOUS_HISTOGRAMS) { 254 } else if (requester == SYNCHRONOUS_HISTOGRAMS) {
255 synchronous_sequence_number_ = last_used_sequence_number_; 255 synchronous_sequence_number_ = last_used_sequence_number_;
256 synchronous_renderers_pending_ = renderer_count; 256 synchronous_renderers_pending_ = renderer_count;
257 } 257 }
258 return last_used_sequence_number_; 258 return last_used_sequence_number_;
259 } 259 }
260 260
261 // static 261 // static
262 HistogramSynchronizer* HistogramSynchronizer::histogram_synchronizer_ = NULL; 262 HistogramSynchronizer* HistogramSynchronizer::histogram_synchronizer_ = NULL;
OLDNEW
« no previous file with comments | « chrome/browser/metrics/histogram_synchronizer.h ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698