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

Side by Side Diff: chrome_elf/chrome_elf_main.cc

Issue 2227453002: Revert of [Windows Sandbox] Turn on MITIGATION_EXTENSION_POINT_DISABLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/win/chrome_elf_init.cc ('k') | components/nacl/broker/BUILD.gn » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome_elf/chrome_elf_main.h" 5 #include "chrome_elf/chrome_elf_main.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/win/iat_patch_function.h" 12 #include "base/win/iat_patch_function.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/app/chrome_crash_reporter_client_win.h" 14 #include "chrome/app/chrome_crash_reporter_client_win.h"
15 #include "chrome/install_static/install_util.h" 15 #include "chrome/install_static/install_util.h"
16 #include "chrome_elf/blacklist/blacklist.h" 16 #include "chrome_elf/blacklist/blacklist.h"
17 #include "chrome_elf/blacklist/crashpad_helper.h" 17 #include "chrome_elf/blacklist/crashpad_helper.h"
18 #include "chrome_elf/chrome_elf_constants.h" 18 #include "chrome_elf/chrome_elf_constants.h"
19 #include "chrome_elf/chrome_elf_security.h"
20 #include "components/crash/content/app/crashpad.h" 19 #include "components/crash/content/app/crashpad.h"
21 #include "components/crash/core/common/crash_keys.h" 20 #include "components/crash/core/common/crash_keys.h"
22 21
23 namespace { 22 namespace {
24 23
25 base::LazyInstance<std::vector<crash_reporter::Report>>::Leaky g_crash_reports = 24 base::LazyInstance<std::vector<crash_reporter::Report>>::Leaky g_crash_reports =
26 LAZY_INSTANCE_INITIALIZER; 25 LAZY_INSTANCE_INITIALIZER;
27 26
28 // Gets the exe name from the full path of the exe. 27 // Gets the exe name from the full path of the exe.
29 base::string16 GetExeName() { 28 base::string16 GetExeName() {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 108
110 BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) { 109 BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
111 if (reason == DLL_PROCESS_ATTACH) { 110 if (reason == DLL_PROCESS_ATTACH) {
112 InitializeCrashReportingForProcess(); 111 InitializeCrashReportingForProcess();
113 // CRT on initialization installs an exception filter which calls 112 // CRT on initialization installs an exception filter which calls
114 // TerminateProcess. We need to hook CRT's attempt to set an exception 113 // TerminateProcess. We need to hook CRT's attempt to set an exception
115 // handler and ignore it. 114 // handler and ignore it.
116 DisableSetUnhandledExceptionFilter(); 115 DisableSetUnhandledExceptionFilter();
117 116
118 install_static::InitializeProcessType(); 117 install_static::InitializeProcessType();
119 if (install_static::g_process_type ==
120 install_static::ProcessType::BROWSER_PROCESS)
121 EarlyBrowserSecurity();
122 118
123 __try { 119 __try {
124 blacklist::Initialize(false); // Don't force, abort if beacon is present. 120 blacklist::Initialize(false); // Don't force, abort if beacon is present.
125 } __except(GenerateCrashDump(GetExceptionInformation())) { 121 } __except(GenerateCrashDump(GetExceptionInformation())) {
126 } 122 }
127 } 123 }
128 return TRUE; 124 return TRUE;
129 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/win/chrome_elf_init.cc ('k') | components/nacl/broker/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698