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

Unified Diff: chrome/browser/process_singleton_win.cc

Issue 15789003: Properly add --original-process-start-time for browser rendezvous. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_singleton_win.cc
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 4a12d397fdb9912c0d237e605ae25be4bcd4587f..ffdb24ee0cf832a0a2286b774909438c27484ccc 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -323,6 +323,12 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
return PROCESS_NOTIFIED;
}
+ CommandLine command_line(*CommandLine::ForCurrentProcess());
+ command_line.AppendSwitchASCII(
+ switches::kOriginalProcessStartTime,
+ base::Int64ToString(
+ base::CurrentProcessInfo::CreationTime()->ToInternalValue()));
+
// Non-metro mode, send our command line to the other chrome message window.
// format is "START\0<<<current directory>>>\0<<<commandline>>>".
std::wstring to_send(L"START\0", 6); // want the NULL in the string.
@@ -331,13 +337,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
return PROCESS_NONE;
to_send.append(cur_dir.value());
to_send.append(L"\0", 1); // Null separator.
- to_send.append(::GetCommandLineW());
- // Add the process start time as a flag.
- to_send.append(L" --");
- to_send.append(ASCIIToWide(switches::kOriginalProcessStartTime));
- to_send.append(L"=");
- to_send.append(base::Int64ToString16(
- base::CurrentProcessInfo::CreationTime()->ToInternalValue()));
+ to_send.append(command_line.GetCommandLineString());
to_send.append(L"\0", 1); // Null separator.
base::win::ScopedHandle process_handle;
« 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