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

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

Issue 515033: Cleanup histogram classes mixing SetFlags into FactoryGet arguments... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 12 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
« no previous file with comments | « chrome/browser/jankometer.cc ('k') | chrome/browser/net/dns_host_info.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 } 1870 }
1871 1871
1872 void MetricsService::RecordCurrentHistograms() { 1872 void MetricsService::RecordCurrentHistograms() {
1873 DCHECK(current_log_); 1873 DCHECK(current_log_);
1874 1874
1875 StatisticsRecorder::Histograms histograms; 1875 StatisticsRecorder::Histograms histograms;
1876 StatisticsRecorder::GetHistograms(&histograms); 1876 StatisticsRecorder::GetHistograms(&histograms);
1877 for (StatisticsRecorder::Histograms::iterator it = histograms.begin(); 1877 for (StatisticsRecorder::Histograms::iterator it = histograms.begin();
1878 histograms.end() != it; 1878 histograms.end() != it;
1879 ++it) { 1879 ++it) {
1880 if ((*it)->flags() & kUmaTargetedHistogramFlag) 1880 if ((*it)->flags() & Histogram::kUmaTargetedHistogramFlag)
1881 // TODO(petersont): Only record historgrams if they are not precluded by 1881 // TODO(petersont): Only record historgrams if they are not precluded by
1882 // the UMA response data. 1882 // the UMA response data.
1883 // Bug http://code.google.com/p/chromium/issues/detail?id=2739. 1883 // Bug http://code.google.com/p/chromium/issues/detail?id=2739.
1884 RecordHistogram(**it); 1884 RecordHistogram(**it);
1885 } 1885 }
1886 } 1886 }
1887 1887
1888 void MetricsService::RecordHistogram(const Histogram& histogram) { 1888 void MetricsService::RecordHistogram(const Histogram& histogram) {
1889 // Get up-to-date snapshot of sample stats. 1889 // Get up-to-date snapshot of sample stats.
1890 Histogram::SampleSet snapshot; 1890 Histogram::SampleSet snapshot;
(...skipping 29 matching lines...) Expand all
1920 thread_id = PlatformThread::CurrentId(); 1920 thread_id = PlatformThread::CurrentId();
1921 return PlatformThread::CurrentId() == thread_id; 1921 return PlatformThread::CurrentId() == thread_id;
1922 } 1922 }
1923 1923
1924 #if defined(OS_CHROMEOS) 1924 #if defined(OS_CHROMEOS)
1925 void MetricsService::StartExternalMetrics(Profile* profile) { 1925 void MetricsService::StartExternalMetrics(Profile* profile) {
1926 external_metrics_ = new chromeos::ExternalMetrics; 1926 external_metrics_ = new chromeos::ExternalMetrics;
1927 external_metrics_->Start(profile); 1927 external_metrics_->Start(profile);
1928 } 1928 }
1929 #endif 1929 #endif
OLDNEW
« no previous file with comments | « chrome/browser/jankometer.cc ('k') | chrome/browser/net/dns_host_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698