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

Side by Side Diff: base/win/win_util.h

Issue 9803002: [windows] Make calls to exit(), _exit(), abort(), and ExitProcess() from the renderer process resul… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address brettw comments 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 | « base/win/dllmain.cc ('k') | base/win/win_util.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // ============================================================================= 5 // =============================================================================
6 // PLEASE READ 6 // PLEASE READ
7 // 7 //
8 // In general, you should not be adding stuff to this file. 8 // In general, you should not be adding stuff to this file.
9 // 9 //
10 // - If your thing is only used in one place, just put it in a reasonable 10 // - If your thing is only used in one place, just put it in a reasonable
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Removes the command specified by |name| from the AutoRun key. |root_key| 86 // Removes the command specified by |name| from the AutoRun key. |root_key|
87 // could be HKCU or HKLM or the root of any user hive. 87 // could be HKCU or HKLM or the root of any user hive.
88 BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name); 88 BASE_EXPORT bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name);
89 89
90 // Reads the command specified by |name| from the AutoRun key. |root_key| 90 // Reads the command specified by |name| from the AutoRun key. |root_key|
91 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests. 91 // could be HKCU or HKLM or the root of any user hive. Used for unit-tests.
92 BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key, 92 BASE_EXPORT bool ReadCommandFromAutoRun(HKEY root_key,
93 const string16& name, 93 const string16& name,
94 string16* command); 94 string16* command);
95 95
96 // Sets whether to crash the process during exit. This is inspected by DLLMain
97 // and used to intercept unexpected terminations of the process (via calls to
98 // exit(), abort(), _exit(), ExitProcess()) and convert them into crashes.
99 // Note that not all mechanisms for terminating the process are covered by
100 // this. In particular, TerminateProcess() is not caught.
101 BASE_EXPORT void SetShouldCrashOnProcessDetach(bool crash);
102 BASE_EXPORT bool ShouldCrashOnProcessDetach();
103
96 // Get the size of a struct up to and including the specified member. 104 // Get the size of a struct up to and including the specified member.
97 // This is necessary to set compatible struct sizes for different versions 105 // This is necessary to set compatible struct sizes for different versions
98 // of certain Windows APIs (e.g. SystemParametersInfo). 106 // of certain Windows APIs (e.g. SystemParametersInfo).
99 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \ 107 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(struct_name, member) \
100 offsetof(struct_name, member) + \ 108 offsetof(struct_name, member) + \
101 (sizeof static_cast<struct_name*>(NULL)->member) 109 (sizeof static_cast<struct_name*>(NULL)->member)
102 110
103 } // namespace win 111 } // namespace win
104 } // namespace base 112 } // namespace base
105 113
106 #endif // BASE_WIN_WIN_UTIL_H_ 114 #endif // BASE_WIN_WIN_UTIL_H_
OLDNEW
« no previous file with comments | « base/win/dllmain.cc ('k') | base/win/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698