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 |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 | 1076 |
1077 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { | 1077 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
1078 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); | 1078 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); |
1079 // Android updates the metrics service dynamically depending on whether the | 1079 // Android updates the metrics service dynamically depending on whether the |
1080 // application is in the foreground or not. Do not start here. | 1080 // application is in the foreground or not. Do not start here. |
1081 #if !defined(OS_ANDROID) | 1081 #if !defined(OS_ANDROID) |
1082 // Now that the file thread has been started, start recording. | 1082 // Now that the file thread has been started, start recording. |
1083 StartMetricsRecording(); | 1083 StartMetricsRecording(); |
1084 #endif | 1084 #endif |
1085 | 1085 |
1086 // Create watchdog thread after creating all other threads because it will | 1086 if (!base::debug::BeingDebugged()) { |
1087 // watch the other threads and they must be running. | 1087 // Create watchdog thread after creating all other threads because it will |
1088 browser_process_->watchdog_thread(); | 1088 // watch the other threads and they must be running. |
| 1089 browser_process_->watchdog_thread(); |
| 1090 } |
1089 | 1091 |
1090 // Do any initializating in the browser process that requires all threads | 1092 // Do any initializating in the browser process that requires all threads |
1091 // running. | 1093 // running. |
1092 browser_process_->PreMainMessageLoopRun(); | 1094 browser_process_->PreMainMessageLoopRun(); |
1093 | 1095 |
1094 // Record last shutdown time into a histogram. | 1096 // Record last shutdown time into a histogram. |
1095 browser_shutdown::ReadLastShutdownInfo(); | 1097 browser_shutdown::ReadLastShutdownInfo(); |
1096 | 1098 |
1097 #if defined(OS_WIN) | 1099 #if defined(OS_WIN) |
1098 // On Windows, we use our startup as an opportunity to do upgrade/uninstall | 1100 // On Windows, we use our startup as an opportunity to do upgrade/uninstall |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 chromeos::CrosSettings::Shutdown(); | 1683 chromeos::CrosSettings::Shutdown(); |
1682 #endif | 1684 #endif |
1683 #endif | 1685 #endif |
1684 } | 1686 } |
1685 | 1687 |
1686 // Public members: | 1688 // Public members: |
1687 | 1689 |
1688 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1690 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1689 chrome_extra_parts_.push_back(parts); | 1691 chrome_extra_parts_.push_back(parts); |
1690 } | 1692 } |
OLD | NEW |