OLD | NEW |
---|---|
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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/at_exit.h" | 14 #include "base/at_exit.h" |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/cpu.h" | |
17 #include "base/debug/trace_event.h" | 18 #include "base/debug/trace_event.h" |
18 #include "base/file_path.h" | 19 #include "base/file_path.h" |
19 #include "base/file_util.h" | 20 #include "base/file_util.h" |
20 #include "base/metrics/field_trial.h" | 21 #include "base/metrics/field_trial.h" |
21 #include "base/metrics/histogram.h" | 22 #include "base/metrics/histogram.h" |
22 #include "base/path_service.h" | 23 #include "base/path_service.h" |
23 #include "base/prefs/json_pref_store.h" | 24 #include "base/prefs/json_pref_store.h" |
24 #include "base/process_info.h" | 25 #include "base/process_info.h" |
25 #include "base/process_util.h" | 26 #include "base/process_util.h" |
26 #include "base/run_loop.h" | 27 #include "base/run_loop.h" |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
994 } | 995 } |
995 | 996 |
996 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { | 997 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
997 // Android updates the metrics service dynamically depending on whether the | 998 // Android updates the metrics service dynamically depending on whether the |
998 // application is in the foreground or not. Do not start here. | 999 // application is in the foreground or not. Do not start here. |
999 #if !defined(OS_ANDROID) | 1000 #if !defined(OS_ANDROID) |
1000 // Now that the file thread has been started, start recording. | 1001 // Now that the file thread has been started, start recording. |
1001 StartMetricsRecording(); | 1002 StartMetricsRecording(); |
1002 #endif | 1003 #endif |
1003 | 1004 |
1005 #if defined(ARCH_CPU_X86_FAMILY) | |
brettw
2013/01/31 20:08:43
If this is the best place you can find, at least p
| |
1006 base::CPU cpu; | |
1007 base::CPU::IntelMicroArchitecture arch = cpu.getIntelMicroArchitecture(); | |
1008 UMA_HISTOGRAM_ENUMERATION("Platform.IntelMaxMicroArchitecture", arch, | |
1009 base::CPU::MaxIntelMicroArchitecture); | |
1010 #endif // defined(ARCH_CPU_X86_FAMILY) | |
brettw
2013/01/31 20:08:43
need two spaces before //
| |
1011 | |
1004 // Create watchdog thread after creating all other threads because it will | 1012 // Create watchdog thread after creating all other threads because it will |
1005 // watch the other threads and they must be running. | 1013 // watch the other threads and they must be running. |
1006 browser_process_->watchdog_thread(); | 1014 browser_process_->watchdog_thread(); |
1007 | 1015 |
1008 // Do any initializating in the browser process that requires all threads | 1016 // Do any initializating in the browser process that requires all threads |
1009 // running. | 1017 // running. |
1010 browser_process_->PreMainMessageLoopRun(); | 1018 browser_process_->PreMainMessageLoopRun(); |
1011 | 1019 |
1012 // Record last shutdown time into a histogram. | 1020 // Record last shutdown time into a histogram. |
1013 browser_shutdown::ReadLastShutdownInfo(); | 1021 browser_shutdown::ReadLastShutdownInfo(); |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1686 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1694 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1687 uma_name += "_XP"; | 1695 uma_name += "_XP"; |
1688 | 1696 |
1689 uma_name += "_PreRead_"; | 1697 uma_name += "_PreRead_"; |
1690 uma_name += pre_read_percentage; | 1698 uma_name += pre_read_percentage; |
1691 AddPreReadHistogramTime(uma_name.c_str(), time); | 1699 AddPreReadHistogramTime(uma_name.c_str(), time); |
1692 } | 1700 } |
1693 #endif | 1701 #endif |
1694 #endif | 1702 #endif |
1695 } | 1703 } |
OLD | NEW |