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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 10454086: Histograms - Support histograms for Plugins, GPU (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/browser/extensions/extension_service.h" 42 #include "chrome/browser/extensions/extension_service.h"
43 #include "chrome/browser/extensions/extensions_startup.h" 43 #include "chrome/browser/extensions/extensions_startup.h"
44 #include "chrome/browser/first_run/upgrade_util.h" 44 #include "chrome/browser/first_run/upgrade_util.h"
45 #include "chrome/browser/google/google_search_counter.h" 45 #include "chrome/browser/google/google_search_counter.h"
46 #include "chrome/browser/google/google_util.h" 46 #include "chrome/browser/google/google_util.h"
47 #include "chrome/browser/gpu_blacklist.h" 47 #include "chrome/browser/gpu_blacklist.h"
48 #include "chrome/browser/gpu_util.h" 48 #include "chrome/browser/gpu_util.h"
49 #include "chrome/browser/jankometer.h" 49 #include "chrome/browser/jankometer.h"
50 #include "chrome/browser/language_usage_metrics.h" 50 #include "chrome/browser/language_usage_metrics.h"
51 #include "chrome/browser/metrics/field_trial_synchronizer.h" 51 #include "chrome/browser/metrics/field_trial_synchronizer.h"
52 #include "chrome/browser/metrics/histogram_synchronizer.h"
53 #include "chrome/browser/metrics/metrics_log.h" 52 #include "chrome/browser/metrics/metrics_log.h"
54 #include "chrome/browser/metrics/metrics_service.h" 53 #include "chrome/browser/metrics/metrics_service.h"
55 #include "chrome/browser/metrics/thread_watcher.h" 54 #include "chrome/browser/metrics/thread_watcher.h"
56 #include "chrome/browser/metrics/tracking_synchronizer.h" 55 #include "chrome/browser/metrics/tracking_synchronizer.h"
57 #include "chrome/browser/metrics/variations_service.h" 56 #include "chrome/browser/metrics/variations_service.h"
58 #include "chrome/browser/nacl_host/nacl_process_host.h" 57 #include "chrome/browser/nacl_host/nacl_process_host.h"
59 #include "chrome/browser/net/chrome_net_log.h" 58 #include "chrome/browser/net/chrome_net_log.h"
60 #include "chrome/browser/net/predictor.h" 59 #include "chrome/browser/net/predictor.h"
61 #include "chrome/browser/notifications/desktop_notification_service.h" 60 #include "chrome/browser/notifications/desktop_notification_service.h"
62 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 61 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 WarnAboutMinimumSystemRequirements(); 1363 WarnAboutMinimumSystemRequirements();
1365 1364
1366 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) 1365 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX)
1367 // Set the product channel for crash reports. 1366 // Set the product channel for crash reports.
1368 child_process_logging::SetChannel( 1367 child_process_logging::SetChannel(
1369 chrome::VersionInfo::GetVersionStringModifier()); 1368 chrome::VersionInfo::GetVersionStringModifier());
1370 #endif 1369 #endif
1371 1370
1372 InitializeNetworkOptions(parsed_command_line()); 1371 InitializeNetworkOptions(parsed_command_line());
1373 1372
1374 // Initialize histogram synchronizer system. This is a singleton and is used 1373 // Initialize tracking synchronizer system. This is a singleton and is used
1375 // for posting tasks via base::Bind. Its deleted when it goes out of scope. 1374 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
1376 // Even though base::Bind does AddRef and Release, the object will not 1375 // Even though base::Bind does AddRef and Release, the object will not
1377 // be deleted after the Task is executed. 1376 // be deleted after the Task is executed.
jar (doing other things) 2012/07/09 23:04:12 This comment could probably be deleted now.
ramant (doing other things) 2012/07/11 23:52:54 Done.
1378 histogram_synchronizer_ = new HistogramSynchronizer();
1379 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); 1377 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer();
1380 1378
1381 // Now that all preferences have been registered, set the install date 1379 // Now that all preferences have been registered, set the install date
1382 // for the uninstall metrics if this is our first run. This only actually 1380 // for the uninstall metrics if this is our first run. This only actually
1383 // gets used if the user has metrics reporting enabled at uninstall time. 1381 // gets used if the user has metrics reporting enabled at uninstall time.
1384 int64 install_date = 1382 int64 install_date =
1385 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate); 1383 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate);
1386 if (install_date == 0) { 1384 if (install_date == 0) {
1387 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate, 1385 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate,
1388 base::Time::Now().ToTimeT()); 1386 base::Time::Now().ToTimeT());
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 if (base::win::GetVersion() <= base::win::VERSION_XP) 2003 if (base::win::GetVersion() <= base::win::VERSION_XP)
2006 uma_name += "_XP"; 2004 uma_name += "_XP";
2007 2005
2008 uma_name += "_PreRead_"; 2006 uma_name += "_PreRead_";
2009 uma_name += pre_read_percentage; 2007 uma_name += pre_read_percentage;
2010 AddPreReadHistogramTime(uma_name.c_str(), time); 2008 AddPreReadHistogramTime(uma_name.c_str(), time);
2011 } 2009 }
2012 #endif 2010 #endif
2013 #endif 2011 #endif
2014 } 2012 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698