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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « win8/delegate_execute/command_execute_impl.cc ('k') | 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) 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 25 matching lines...) Expand all
36 // presence of test_registrar.exe, a viewer process, and all needed DLLs in the 36 // presence of test_registrar.exe, a viewer process, and all needed DLLs in the
37 // same directory as the calling module. 37 // same directory as the calling module.
38 bool RegisterTestDefaultBrowser() { 38 bool RegisterTestDefaultBrowser() {
39 base::FilePath dir; 39 base::FilePath dir;
40 if (!PathService::Get(base::DIR_EXE, &dir)) 40 if (!PathService::Get(base::DIR_EXE, &dir))
41 return false; 41 return false;
42 42
43 base::FilePath chrome_exe(dir.Append(kChromeExe)); 43 base::FilePath chrome_exe(dir.Append(kChromeExe));
44 base::FilePath registrar(dir.Append(kRegistrar)); 44 base::FilePath registrar(dir.Append(kRegistrar));
45 45
46 if (!file_util::PathExists(chrome_exe) || !file_util::PathExists(registrar)) { 46 if (!base::PathExists(chrome_exe) || !base::PathExists(registrar)) {
47 LOG(ERROR) << "Could not locate " << kChromeExe << " or " << kRegistrar; 47 LOG(ERROR) << "Could not locate " << kChromeExe << " or " << kRegistrar;
48 return false; 48 return false;
49 } 49 }
50 50
51 // Perform the registration by invoking test_registrar.exe. 51 // Perform the registration by invoking test_registrar.exe.
52 CommandLine register_command(registrar); 52 CommandLine register_command(registrar);
53 register_command.AppendArg("/RegServer"); 53 register_command.AppendArg("/RegServer");
54 54
55 base::win::ScopedHandle register_handle; 55 base::win::ScopedHandle register_handle;
56 if (base::LaunchProcess(register_command, base::LaunchOptions(), 56 if (base::LaunchProcess(register_command, base::LaunchOptions(),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 std::vector<base::string16> choices; 122 std::vector<base::string16> choices;
123 OpenWithDialogController controller; 123 OpenWithDialogController controller;
124 HRESULT hr = controller.RunSynchronously( 124 HRESULT hr = controller.RunSynchronously(
125 NULL, kDefaultBrowserProtocol, win8::test::kDefaultTestExeName, &choices); 125 NULL, kDefaultBrowserProtocol, win8::test::kDefaultTestExeName, &choices);
126 LOG_IF(ERROR, FAILED(hr)) << std::hex << hr; 126 LOG_IF(ERROR, FAILED(hr)) << std::hex << hr;
127 DCHECK(IsTestDefaultForProtocol(kDefaultBrowserProtocol)); 127 DCHECK(IsTestDefaultForProtocol(kDefaultBrowserProtocol));
128 return SUCCEEDED(hr); 128 return SUCCEEDED(hr);
129 } 129 }
130 130
131 } // namespace win8 131 } // namespace win8
OLDNEW
« no previous file with comments | « win8/delegate_execute/command_execute_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698