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

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

Issue 21302005: Add CurrentProcessInfo::CreationTime() for Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac Created 7 years, 4 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 | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/app_list/app_list_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_process_finder_win.h" 5 #include "chrome/browser/chrome_process_finder_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 process_id, PROCESS_QUERY_INFORMATION, 142 process_id, PROCESS_QUERY_INFORMATION,
143 process_handle.Receive()) && 143 process_handle.Receive()) &&
144 base::win::IsProcessImmersive(process_handle.Get())) { 144 base::win::IsProcessImmersive(process_handle.Get())) {
145 chrome::ActivateMetroChrome(); 145 chrome::ActivateMetroChrome();
146 } 146 }
147 147
148 CommandLine command_line(*CommandLine::ForCurrentProcess()); 148 CommandLine command_line(*CommandLine::ForCurrentProcess());
149 command_line.AppendSwitchASCII( 149 command_line.AppendSwitchASCII(
150 switches::kOriginalProcessStartTime, 150 switches::kOriginalProcessStartTime,
151 base::Int64ToString( 151 base::Int64ToString(
152 base::CurrentProcessInfo::CreationTime()->ToInternalValue())); 152 base::CurrentProcessInfo::CreationTime().ToInternalValue()));
153 153
154 if (fast_start) 154 if (fast_start)
155 command_line.AppendSwitch(switches::kFastStart); 155 command_line.AppendSwitch(switches::kFastStart);
156 156
157 // Send the command line to the remote chrome window. 157 // Send the command line to the remote chrome window.
158 // Format is "START\0<<<current directory>>>\0<<<commandline>>>". 158 // Format is "START\0<<<current directory>>>\0<<<commandline>>>".
159 std::wstring to_send(L"START\0", 6); // want the NULL in the string. 159 std::wstring to_send(L"START\0", 6); // want the NULL in the string.
160 base::FilePath cur_dir; 160 base::FilePath cur_dir;
161 if (!file_util::GetCurrentDirectory(&cur_dir)) 161 if (!file_util::GetCurrentDirectory(&cur_dir))
162 return NOTIFY_FAILED; 162 return NOTIFY_FAILED;
(...skipping 23 matching lines...) Expand all
186 186
187 // It is possible that the process owning this window may have died by now. 187 // It is possible that the process owning this window may have died by now.
188 if (!::IsWindow(remote_window)) 188 if (!::IsWindow(remote_window))
189 return NOTIFY_FAILED; 189 return NOTIFY_FAILED;
190 190
191 // If the window couldn't be notified but still exists, assume it is hung. 191 // If the window couldn't be notified but still exists, assume it is hung.
192 return NOTIFY_WINDOW_HUNG; 192 return NOTIFY_WINDOW_HUNG;
193 } 193 }
194 194
195 } // namespace chrome 195 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/app_list/app_list_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698