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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 #include "chrome/browser/chrome_browser_main_win.h" | 169 #include "chrome/browser/chrome_browser_main_win.h" |
170 #include "chrome/browser/chrome_select_file_dialog_factory_win.h" | 170 #include "chrome/browser/chrome_select_file_dialog_factory_win.h" |
171 #include "chrome/browser/component_updater/caps_installer_win.h" | 171 #include "chrome/browser/component_updater/caps_installer_win.h" |
172 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" | 172 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
173 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 173 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
174 #include "chrome/browser/first_run/upgrade_util_win.h" | 174 #include "chrome/browser/first_run/upgrade_util_win.h" |
175 #include "chrome/browser/ui/network_profile_bubble.h" | 175 #include "chrome/browser/ui/network_profile_bubble.h" |
176 #include "chrome/installer/util/helper.h" | 176 #include "chrome/installer/util/helper.h" |
177 #include "chrome/installer/util/install_util.h" | 177 #include "chrome/installer/util/install_util.h" |
178 #include "chrome/installer/util/shell_util.h" | 178 #include "chrome/installer/util/shell_util.h" |
| 179 #include "components/browser_watcher/exit_funnel_win.h" |
179 #include "net/base/net_util.h" | 180 #include "net/base/net_util.h" |
180 #include "ui/base/l10n/l10n_util_win.h" | 181 #include "ui/base/l10n/l10n_util_win.h" |
181 #include "ui/gfx/win/dpi.h" | 182 #include "ui/gfx/win/dpi.h" |
182 #include "ui/shell_dialogs/select_file_dialog.h" | 183 #include "ui/shell_dialogs/select_file_dialog.h" |
183 #endif // defined(OS_WIN) | 184 #endif // defined(OS_WIN) |
184 | 185 |
185 #if defined(OS_MACOSX) | 186 #if defined(OS_MACOSX) |
186 #include <Security/Security.h> | 187 #include <Security/Security.h> |
187 | 188 |
188 #include "base/mac/scoped_nsautorelease_pool.h" | 189 #include "base/mac/scoped_nsautorelease_pool.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 #endif | 459 #endif |
459 | 460 |
460 cus->Start(); | 461 cus->Start(); |
461 } | 462 } |
462 | 463 |
463 #if !defined(OS_ANDROID) | 464 #if !defined(OS_ANDROID) |
464 bool ProcessSingletonNotificationCallback( | 465 bool ProcessSingletonNotificationCallback( |
465 const base::CommandLine& command_line, | 466 const base::CommandLine& command_line, |
466 const base::FilePath& current_directory) { | 467 const base::FilePath& current_directory) { |
467 // Drop the request if the browser process is already in shutdown path. | 468 // Drop the request if the browser process is already in shutdown path. |
468 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 469 if (!g_browser_process || g_browser_process->IsShuttingDown()) { |
| 470 #if defined(OS_WIN) |
| 471 browser_watcher::ExitFunnel::RecordSingleEvent( |
| 472 chrome::kBrowserExitCodesRegistryPath, |
| 473 L"ProcessSingletonIsShuttingDown"); |
| 474 #endif |
| 475 |
469 return false; | 476 return false; |
| 477 } |
470 | 478 |
471 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { | 479 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { |
472 std::string start_time_string = | 480 std::string start_time_string = |
473 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); | 481 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); |
474 int64 remote_start_time; | 482 int64 remote_start_time; |
475 if (base::StringToInt64(start_time_string, &remote_start_time)) { | 483 if (base::StringToInt64(start_time_string, &remote_start_time)) { |
476 base::TimeDelta elapsed = | 484 base::TimeDelta elapsed = |
477 base::Time::Now() - base::Time::FromInternalValue(remote_start_time); | 485 base::Time::Now() - base::Time::FromInternalValue(remote_start_time); |
478 if (command_line.HasSwitch(switches::kFastStart)) { | 486 if (command_line.HasSwitch(switches::kFastStart)) { |
479 UMA_HISTOGRAM_LONG_TIMES( | 487 UMA_HISTOGRAM_LONG_TIMES( |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 chromeos::CrosSettings::Shutdown(); | 1730 chromeos::CrosSettings::Shutdown(); |
1723 #endif | 1731 #endif |
1724 #endif | 1732 #endif |
1725 } | 1733 } |
1726 | 1734 |
1727 // Public members: | 1735 // Public members: |
1728 | 1736 |
1729 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1737 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1730 chrome_extra_parts_.push_back(parts); | 1738 chrome_extra_parts_.push_back(parts); |
1731 } | 1739 } |
OLD | NEW |