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

Side by Side Diff: win8/test/metro_registration_helper.cc

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
« no previous file with comments | « win8/metro_driver/metro_driver.cc ('k') | win8/test/test_registrar.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "win8/test/metro_registration_helper.h" 5 #include "win8/test/metro_registration_helper.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 base::FilePath chrome_exe(dir.Append(kChromeExe)); 44 base::FilePath chrome_exe(dir.Append(kChromeExe));
45 base::FilePath registrar(dir.Append(kRegistrar)); 45 base::FilePath registrar(dir.Append(kRegistrar));
46 46
47 if (!base::PathExists(chrome_exe) || !base::PathExists(registrar)) { 47 if (!base::PathExists(chrome_exe) || !base::PathExists(registrar)) {
48 LOG(ERROR) << "Could not locate " << kChromeExe << " or " << kRegistrar; 48 LOG(ERROR) << "Could not locate " << kChromeExe << " or " << kRegistrar;
49 return false; 49 return false;
50 } 50 }
51 51
52 // Perform the registration by invoking test_registrar.exe. 52 // Perform the registration by invoking test_registrar.exe.
53 CommandLine register_command(registrar); 53 base::CommandLine register_command(registrar);
54 register_command.AppendArg("/RegServer"); 54 register_command.AppendArg("/RegServer");
55 55
56 base::Process register_process = 56 base::Process register_process =
57 base::LaunchProcess(register_command.GetCommandLineString(), 57 base::LaunchProcess(register_command.GetCommandLineString(),
58 base::LaunchOptions()); 58 base::LaunchOptions());
59 if (register_process.IsValid()) { 59 if (register_process.IsValid()) {
60 int ret = 0; 60 int ret = 0;
61 if (base::WaitForExitCodeWithTimeout( 61 if (base::WaitForExitCodeWithTimeout(
62 register_process.Handle(), &ret, 62 register_process.Handle(), &ret,
63 base::TimeDelta::FromSeconds(kRegistrationTimeoutSeconds))) { 63 base::TimeDelta::FromSeconds(kRegistrationTimeoutSeconds))) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 std::vector<base::string16> choices; 124 std::vector<base::string16> choices;
125 OpenWithDialogController controller; 125 OpenWithDialogController controller;
126 HRESULT hr = controller.RunSynchronously( 126 HRESULT hr = controller.RunSynchronously(
127 NULL, kDefaultBrowserProtocol, win8::test::kDefaultTestExeName, &choices); 127 NULL, kDefaultBrowserProtocol, win8::test::kDefaultTestExeName, &choices);
128 LOG_IF(ERROR, FAILED(hr)) << std::hex << hr; 128 LOG_IF(ERROR, FAILED(hr)) << std::hex << hr;
129 DCHECK(IsTestDefaultForProtocol(kDefaultBrowserProtocol)); 129 DCHECK(IsTestDefaultForProtocol(kDefaultBrowserProtocol));
130 return SUCCEEDED(hr); 130 return SUCCEEDED(hr);
131 } 131 }
132 132
133 } // namespace win8 133 } // namespace win8
OLDNEW
« no previous file with comments | « win8/metro_driver/metro_driver.cc ('k') | win8/test/test_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698