Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 15813003: Ignore malformed arguments to --original-process-start-time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 const CommandLine& command_line, 423 const CommandLine& command_line,
424 const base::FilePath& current_directory) { 424 const base::FilePath& current_directory) {
425 // Drop the request if the browser process is already in shutdown path. 425 // Drop the request if the browser process is already in shutdown path.
426 if (!g_browser_process || g_browser_process->IsShuttingDown()) 426 if (!g_browser_process || g_browser_process->IsShuttingDown())
427 return false; 427 return false;
428 428
429 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { 429 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) {
430 std::string start_time_string = 430 std::string start_time_string =
431 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); 431 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime);
432 int64 remote_start_time; 432 int64 remote_start_time;
433 base::StringToInt64(start_time_string, &remote_start_time); 433 if (base::StringToInt64(start_time_string, &remote_start_time)) {
434 UMA_HISTOGRAM_LONG_TIMES( 434 UMA_HISTOGRAM_LONG_TIMES(
435 "Startup.WarmStartTimeFromRemoteProcessStart", 435 "Startup.WarmStartTimeFromRemoteProcessStart",
436 base::Time::Now() - base::Time::FromInternalValue(remote_start_time)); 436 base::Time::Now() - base::Time::FromInternalValue(remote_start_time));
437 }
437 } 438 }
438 439
439 g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing( 440 g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing(
440 command_line); 441 command_line);
441 442
442 // TODO(erikwright): Consider removing this - AFAIK it is no longer used. 443 // TODO(erikwright): Consider removing this - AFAIK it is no longer used.
443 // Handle the --uninstall-extension startup action. This needs to done here in 444 // Handle the --uninstall-extension startup action. This needs to done here in
444 // the process that is running with the target profile, otherwise the 445 // the process that is running with the target profile, otherwise the
445 // uninstall will fail to unload and remove all components. 446 // uninstall will fail to unload and remove all components.
446 if (command_line.HasSwitch(switches::kUninstallExtension)) { 447 if (command_line.HasSwitch(switches::kUninstallExtension)) {
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 if (base::win::GetVersion() <= base::win::VERSION_XP) 1809 if (base::win::GetVersion() <= base::win::VERSION_XP)
1809 uma_name += "_XP"; 1810 uma_name += "_XP";
1810 1811
1811 uma_name += "_PreRead_"; 1812 uma_name += "_PreRead_";
1812 uma_name += pre_read_percentage; 1813 uma_name += pre_read_percentage;
1813 AddPreReadHistogramTime(uma_name.c_str(), time); 1814 AddPreReadHistogramTime(uma_name.c_str(), time);
1814 } 1815 }
1815 #endif 1816 #endif
1816 #endif 1817 #endif
1817 } 1818 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698