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

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

Issue 126279: Consistently use int64 for integers holding number of milliseconds. (Closed)
Patch Set: Created 11 years, 6 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 | « chrome/browser/history/expire_history_backend.cc ('k') | chrome/browser/net/url_fetcher.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 5
6 6
7 //------------------------------------------------------------------------------ 7 //------------------------------------------------------------------------------
8 // Description of the life cycle of a instance of MetricsService. 8 // Description of the life cycle of a instance of MetricsService.
9 // 9 //
10 // OVERVIEW 10 // OVERVIEW
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 905
906 // Right before the UMA transmission gets started, there's one more thing we'd 906 // Right before the UMA transmission gets started, there's one more thing we'd
907 // like to record: the histogram of memory usage, so we spawn a task to 907 // like to record: the histogram of memory usage, so we spawn a task to
908 // collect the memory details and when that task is finished, it will call 908 // collect the memory details and when that task is finished, it will call
909 // OnMemoryDetailCollectionDone, which will call HistogramSynchronization to 909 // OnMemoryDetailCollectionDone, which will call HistogramSynchronization to
910 // collect histograms from all renderers and then we will call 910 // collect histograms from all renderers and then we will call
911 // OnHistogramSynchronizationDone to continue processing. 911 // OnHistogramSynchronizationDone to continue processing.
912 MessageLoop::current()->PostDelayedTask(FROM_HERE, 912 MessageLoop::current()->PostDelayedTask(FROM_HERE,
913 log_sender_factory_. 913 log_sender_factory_.
914 NewRunnableMethod(&MetricsService::LogTransmissionTimerDone), 914 NewRunnableMethod(&MetricsService::LogTransmissionTimerDone),
915 static_cast<int>(interlog_duration_.InMilliseconds())); 915 interlog_duration_.InMilliseconds());
916 } 916 }
917 917
918 void MetricsService::LogTransmissionTimerDone() { 918 void MetricsService::LogTransmissionTimerDone() {
919 Task* task = log_sender_factory_. 919 Task* task = log_sender_factory_.
920 NewRunnableMethod(&MetricsService::OnMemoryDetailCollectionDone); 920 NewRunnableMethod(&MetricsService::OnMemoryDetailCollectionDone);
921 921
922 MetricsMemoryDetails* details = new MetricsMemoryDetails(task); 922 MetricsMemoryDetails* details = new MetricsMemoryDetails(task);
923 details->StartFetch(); 923 details->StartFetch();
924 924
925 // Collect WebCore cache information to put into a histogram. 925 // Collect WebCore cache information to put into a histogram.
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 L"." + key; 1897 L"." + key;
1898 prof_prefs->SetInteger(pref_key.c_str(), value); 1898 prof_prefs->SetInteger(pref_key.c_str(), value);
1899 } 1899 }
1900 1900
1901 static bool IsSingleThreaded() { 1901 static bool IsSingleThreaded() {
1902 static PlatformThreadId thread_id = 0; 1902 static PlatformThreadId thread_id = 0;
1903 if (!thread_id) 1903 if (!thread_id)
1904 thread_id = PlatformThread::CurrentId(); 1904 thread_id = PlatformThread::CurrentId();
1905 return PlatformThread::CurrentId() == thread_id; 1905 return PlatformThread::CurrentId() == thread_id;
1906 } 1906 }
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend.cc ('k') | chrome/browser/net/url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698