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

Side by Side Diff: win8/delegate_execute/command_execute_impl.cc

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix delegate_execute for google_chrome_build Created 7 years 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 | « win8/delegate_execute/chrome_util.cc ('k') | win8/test/metro_registration_helper.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 (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 // Implementation of the CommandExecuteImpl class which implements the 4 // Implementation of the CommandExecuteImpl class which implements the
5 // IExecuteCommand and related interfaces for handling ShellExecute based 5 // IExecuteCommand and related interfaces for handling ShellExecute based
6 // launches of the Chrome browser. 6 // launches of the Chrome browser.
7 7
8 #include "win8/delegate_execute/command_execute_impl.h" 8 #include "win8/delegate_execute/command_execute_impl.h"
9 9
10 #include <shlguid.h> 10 #include <shlguid.h>
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 break; 480 break;
481 } 481 }
482 482
483 CommandLine chrome( 483 CommandLine chrome(
484 delegate_execute::MakeChromeCommandLine(chrome_exe_, parameters_, 484 delegate_execute::MakeChromeCommandLine(chrome_exe_, parameters_,
485 display_name)); 485 display_name));
486 string16 command_line(chrome.GetCommandLineString()); 486 string16 command_line(chrome.GetCommandLineString());
487 487
488 AtlTrace("Formatted command line is %ls\n", command_line.c_str()); 488 AtlTrace("Formatted command line is %ls\n", command_line.c_str());
489 489
490 base::win::ScopedProcessInformation proc_info; 490 PROCESS_INFORMATION temp_process_info = {};
491 BOOL ret = CreateProcess(chrome_exe_.value().c_str(), 491 BOOL ret = CreateProcess(chrome_exe_.value().c_str(),
492 const_cast<LPWSTR>(command_line.c_str()), 492 const_cast<LPWSTR>(command_line.c_str()),
493 NULL, NULL, FALSE, 0, NULL, NULL, &start_info_, 493 NULL, NULL, FALSE, 0, NULL, NULL, &start_info_,
494 proc_info.Receive()); 494 &temp_process_info);
495 if (ret) { 495 if (ret) {
496 base::win::ScopedProcessInformation proc_info(temp_process_info);
496 AtlTrace("Process id is %d\n", proc_info.process_id()); 497 AtlTrace("Process id is %d\n", proc_info.process_id());
497 AllowSetForegroundWindow(proc_info.process_id()); 498 AllowSetForegroundWindow(proc_info.process_id());
498 } else { 499 } else {
499 AtlTrace("Process launch failed, error %d\n", ::GetLastError()); 500 AtlTrace("Process launch failed, error %d\n", ::GetLastError());
500 } 501 }
501 502
502 return S_OK; 503 return S_OK;
503 } 504 }
504 505
505 EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() { 506 EC_HOST_UI_MODE CommandExecuteImpl::GetLaunchMode() {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 AtlTrace("Invalid registry launch mode value %u\n", reg_value); 561 AtlTrace("Invalid registry launch mode value %u\n", reg_value);
561 launch_mode = ECHUIM_DESKTOP; 562 launch_mode = ECHUIM_DESKTOP;
562 } else { 563 } else {
563 launch_mode = static_cast<EC_HOST_UI_MODE>(reg_value); 564 launch_mode = static_cast<EC_HOST_UI_MODE>(reg_value);
564 AtlTrace("Launch mode forced by registry to %s\n", modes[launch_mode]); 565 AtlTrace("Launch mode forced by registry to %s\n", modes[launch_mode]);
565 } 566 }
566 567
567 launch_mode_determined = true; 568 launch_mode_determined = true;
568 return launch_mode; 569 return launch_mode;
569 } 570 }
OLDNEW
« no previous file with comments | « win8/delegate_execute/chrome_util.cc ('k') | win8/test/metro_registration_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698