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

Side by Side Diff: chrome_frame/test_utils.cc

Issue 9533009: Don't crash if the CF Tests are not running as admin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | 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) 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 4
5 #include "chrome_frame/test_utils.h" 5 #include "chrome_frame/test_utils.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlwin.h> 8 #include <atlwin.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <winternl.h> 10 #include <winternl.h>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (!base::WaitForExitCodeWithTimeout(process_handle, &exit_code, 116 if (!base::WaitForExitCodeWithTimeout(process_handle, &exit_code,
117 kDllRegistrationTimeoutMs)) { 117 kDllRegistrationTimeoutMs)) {
118 LOG(ERROR) << "Timeout waiting to register or unregister DLL with " 118 LOG(ERROR) << "Timeout waiting to register or unregister DLL with "
119 "command: " << registration_command; 119 "command: " << registration_command;
120 base::KillProcess(process_handle, 0, false); 120 base::KillProcess(process_handle, 0, false);
121 NOTREACHED() << "Aborting test due to registration failure."; 121 NOTREACHED() << "Aborting test due to registration failure.";
122 } 122 }
123 } 123 }
124 if (exit_code != 0) { 124 if (exit_code != 0) {
125 if (registration_operation == REGISTER) { 125 if (registration_operation == REGISTER) {
126 LOG(FATAL) 126 LOG(ERROR)
127 << "DLL registration failed (exit code: 0x" << std::hex << exit_code 127 << "DLL registration failed (exit code: 0x" << std::hex << exit_code
128 << ", command: " << registration_command 128 << ", command: " << registration_command
129 << "). Make sure you are running as Admin."; 129 << "). Make sure you are running as Admin.";
130 ::ExitProcess(1);
130 } else { 131 } else {
131 LOG(WARNING) 132 LOG(WARNING)
132 << "DLL unregistration failed (exit code: 0x" << std::hex << exit_code 133 << "DLL unregistration failed (exit code: 0x" << std::hex << exit_code
133 << ", command: " << registration_command << ")."; 134 << ", command: " << registration_command << ").";
134 } 135 }
135 } 136 }
136 } 137 }
137 138
138 // static 139 // static
139 void ScopedChromeFrameRegistrar::RegisterAtPath( 140 void ScopedChromeFrameRegistrar::RegisterAtPath(
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 UOI_NAME, 433 UOI_NAME,
433 name, 434 name,
434 sizeof(name), 435 sizeof(name),
435 &needed)) { 436 &needed)) {
436 is_locked = lstrcmpi(name, L"default") != 0; 437 is_locked = lstrcmpi(name, L"default") != 0;
437 } 438 }
438 ::CloseDesktop(input_desk); 439 ::CloseDesktop(input_desk);
439 } 440 }
440 return is_locked; 441 return is_locked;
441 } 442 }
OLDNEW
« 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