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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 | 158 |
159 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
160 #include "base/environment.h" // For PreRead experiment. | 160 #include "base/environment.h" // For PreRead experiment. |
161 #include "base/win/windows_version.h" | 161 #include "base/win/windows_version.h" |
162 #include "chrome/browser/browser_util_win.h" | 162 #include "chrome/browser/browser_util_win.h" |
163 #include "chrome/browser/chrome_browser_main_win.h" | 163 #include "chrome/browser/chrome_browser_main_win.h" |
164 #include "chrome/browser/chrome_select_file_dialog_factory_win.h" | 164 #include "chrome/browser/chrome_select_file_dialog_factory_win.h" |
165 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" | 165 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
166 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 166 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
167 #include "chrome/browser/first_run/upgrade_util_win.h" | 167 #include "chrome/browser/first_run/upgrade_util_win.h" |
168 #include "chrome/browser/jumplist_metrics.h" | |
168 #include "chrome/browser/ui/network_profile_bubble.h" | 169 #include "chrome/browser/ui/network_profile_bubble.h" |
169 #include "chrome/installer/util/helper.h" | 170 #include "chrome/installer/util/helper.h" |
170 #include "chrome/installer/util/install_util.h" | 171 #include "chrome/installer/util/install_util.h" |
171 #include "chrome/installer/util/shell_util.h" | 172 #include "chrome/installer/util/shell_util.h" |
172 #include "net/base/net_util.h" | 173 #include "net/base/net_util.h" |
173 #include "ui/base/l10n/l10n_util_win.h" | 174 #include "ui/base/l10n/l10n_util_win.h" |
174 #include "ui/gfx/win/dpi.h" | 175 #include "ui/gfx/win/dpi.h" |
175 #include "ui/shell_dialogs/select_file_dialog.h" | 176 #include "ui/shell_dialogs/select_file_dialog.h" |
176 #endif // defined(OS_WIN) | 177 #endif // defined(OS_WIN) |
177 | 178 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 } | 449 } |
449 | 450 |
450 #if !defined(OS_ANDROID) | 451 #if !defined(OS_ANDROID) |
451 bool ProcessSingletonNotificationCallback( | 452 bool ProcessSingletonNotificationCallback( |
452 const CommandLine& command_line, | 453 const CommandLine& command_line, |
453 const base::FilePath& current_directory) { | 454 const base::FilePath& current_directory) { |
454 // Drop the request if the browser process is already in shutdown path. | 455 // Drop the request if the browser process is already in shutdown path. |
455 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 456 if (!g_browser_process || g_browser_process->IsShuttingDown()) |
456 return false; | 457 return false; |
457 | 458 |
459 #if defined(OS_WIN) | |
460 // Log whether this process was a result of an action in the Windows Jumplist. | |
461 if (command_line.HasSwitch(switches::kWinJumplistAction)) { | |
462 JumplistMetrics::LogJumplistActionFromSwitchValue( | |
463 command_line.GetSwitchValueASCII(switches::kWinJumplistAction)); | |
tapted
2014/11/10 23:47:41
If you want to catch metrics recording for the cas
noms (inactive)
2014/11/12 19:04:11
Ahh, I misunderstood when this was called. I was u
| |
464 } | |
465 #endif | |
466 | |
458 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { | 467 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { |
459 std::string start_time_string = | 468 std::string start_time_string = |
460 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); | 469 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); |
461 int64 remote_start_time; | 470 int64 remote_start_time; |
462 if (base::StringToInt64(start_time_string, &remote_start_time)) { | 471 if (base::StringToInt64(start_time_string, &remote_start_time)) { |
463 base::TimeDelta elapsed = | 472 base::TimeDelta elapsed = |
464 base::Time::Now() - base::Time::FromInternalValue(remote_start_time); | 473 base::Time::Now() - base::Time::FromInternalValue(remote_start_time); |
465 if (command_line.HasSwitch(switches::kFastStart)) { | 474 if (command_line.HasSwitch(switches::kFastStart)) { |
466 UMA_HISTOGRAM_LONG_TIMES( | 475 UMA_HISTOGRAM_LONG_TIMES( |
467 "Startup.WarmStartTimeFromRemoteProcessStartFast", elapsed); | 476 "Startup.WarmStartTimeFromRemoteProcessStartFast", elapsed); |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1698 chromeos::CrosSettings::Shutdown(); | 1707 chromeos::CrosSettings::Shutdown(); |
1699 #endif | 1708 #endif |
1700 #endif | 1709 #endif |
1701 } | 1710 } |
1702 | 1711 |
1703 // Public members: | 1712 // Public members: |
1704 | 1713 |
1705 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1714 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1706 chrome_extra_parts_.push_back(parts); | 1715 chrome_extra_parts_.push_back(parts); |
1707 } | 1716 } |
OLD | NEW |