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 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/debug/crash_logging.h" | 14 #include "base/debug/crash_logging.h" |
15 #include "base/debug/debugger.h" | 15 #include "base/debug/debugger.h" |
16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
17 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
18 #include "base/metrics/field_trial.h" | 18 #include "base/metrics/field_trial.h" |
19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram_macros.h" |
20 #include "base/path_service.h" | 20 #include "base/path_service.h" |
21 #include "base/prefs/json_pref_store.h" | 21 #include "base/prefs/json_pref_store.h" |
22 #include "base/prefs/pref_registry_simple.h" | 22 #include "base/prefs/pref_registry_simple.h" |
23 #include "base/prefs/pref_service.h" | 23 #include "base/prefs/pref_service.h" |
24 #include "base/prefs/pref_value_store.h" | 24 #include "base/prefs/pref_value_store.h" |
25 #include "base/prefs/scoped_user_pref_update.h" | 25 #include "base/prefs/scoped_user_pref_update.h" |
26 #include "base/process/process_info.h" | 26 #include "base/process/process_info.h" |
27 #include "base/profiler/scoped_tracker.h" | 27 #include "base/profiler/scoped_tracker.h" |
28 #include "base/run_loop.h" | 28 #include "base/run_loop.h" |
29 #include "base/strings/string_number_conversions.h" | 29 #include "base/strings/string_number_conversions.h" |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 BrowserThread::PostDelayedTask( | 1105 BrowserThread::PostDelayedTask( |
1106 BrowserThread::UI, | 1106 BrowserThread::UI, |
1107 FROM_HERE, | 1107 FROM_HERE, |
1108 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), | 1108 base::Bind(&WebRtcLogUtil::DeleteOldWebRtcLogFilesForAllProfiles), |
1109 base::TimeDelta::FromMinutes(1)); | 1109 base::TimeDelta::FromMinutes(1)); |
1110 #endif | 1110 #endif |
1111 } | 1111 } |
1112 | 1112 |
1113 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { | 1113 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
1114 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); | 1114 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); |
| 1115 SCOPED_UMA_HISTOGRAM_TIMER("Startup.PreMainMessageLoopRunImplTime"); |
1115 // Android updates the metrics service dynamically depending on whether the | 1116 // Android updates the metrics service dynamically depending on whether the |
1116 // application is in the foreground or not. Do not start here. | 1117 // application is in the foreground or not. Do not start here. |
1117 #if !defined(OS_ANDROID) | 1118 #if !defined(OS_ANDROID) |
1118 // Now that the file thread has been started, start recording. | 1119 // Now that the file thread has been started, start recording. |
1119 StartMetricsRecording(); | 1120 StartMetricsRecording(); |
1120 #endif | 1121 #endif |
1121 | 1122 |
1122 if (!base::debug::BeingDebugged()) { | 1123 if (!base::debug::BeingDebugged()) { |
1123 // Create watchdog thread after creating all other threads because it will | 1124 // Create watchdog thread after creating all other threads because it will |
1124 // watch the other threads and they must be running. | 1125 // watch the other threads and they must be running. |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 chromeos::CrosSettings::Shutdown(); | 1721 chromeos::CrosSettings::Shutdown(); |
1721 #endif | 1722 #endif |
1722 #endif | 1723 #endif |
1723 } | 1724 } |
1724 | 1725 |
1725 // Public members: | 1726 // Public members: |
1726 | 1727 |
1727 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1728 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1728 chrome_extra_parts_.push_back(parts); | 1729 chrome_extra_parts_.push_back(parts); |
1729 } | 1730 } |
OLD | NEW |