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

Unified Diff: chrome_frame/crash_reporting/crash_dll.cc

Issue 3076042: Use Environment::SetVar in more places. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: rebased to ToT Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/crash_reporting/crash_dll.h ('k') | chrome_frame/crash_reporting/nt_loader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/crash_reporting/crash_dll.cc
diff --git a/chrome_frame/crash_reporting/crash_dll.cc b/chrome_frame/crash_reporting/crash_dll.cc
index 97f41c9ee04c92d76ed1de3c0bf2f8ebd129996b..0fc1048fd2be69388a7cce562f476c777a256420 100644
--- a/chrome_frame/crash_reporting/crash_dll.cc
+++ b/chrome_frame/crash_reporting/crash_dll.cc
@@ -1,7 +1,7 @@
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
+
// Main entry point for a DLL that can be instructed to crash on
// load or unload by setting an environment variable appropriately.
//
@@ -10,7 +10,9 @@
// during DLL_PROCESS_ATTACH. This in turn causes the loading process to
// crash on exit. To work around this, this DLL has its entrypoint set
// to the DllMain routine and does not link with the CRT.
+
#include <windows.h>
+
#include "crash_dll.h"
void Crash() {
@@ -26,14 +28,12 @@ void CrashConditionally(const wchar_t* name) {
Crash();
}
-extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
- DWORD reason,
+extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason,
LPVOID reserved) {
- if (reason == DLL_PROCESS_ATTACH) {
+ if (reason == DLL_PROCESS_ATTACH)
CrashConditionally(kCrashOnLoadMode);
- } else if (reason == DLL_PROCESS_DETACH) {
+ else if (reason == DLL_PROCESS_DETACH)
CrashConditionally(kCrashOnUnloadMode);
- }
return 1;
}
« no previous file with comments | « chrome_frame/crash_reporting/crash_dll.h ('k') | chrome_frame/crash_reporting/nt_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698