Content settings: remove some plugin-related code/resources when... there are no...
[chromium-blink-merge.git] / content / shell / common / v8_breakpad_support_win.cc
blob584b3ad1868dfeddfe8a5bc03ec80ec18f7c5c10
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/shell/common/v8_breakpad_support_win.h"
7 #include <windows.h>
9 #include "base/logging.h"
10 #include "gin/public/debug.h"
12 namespace v8_breakpad_support {
14 void SetUp() {
15 #ifdef _WIN64
16 // Get the breakpad pointer from content_shell.exe
17 gin::Debug::CodeRangeCreatedCallback create_callback =
18 reinterpret_cast<gin::Debug::CodeRangeCreatedCallback>(
19 ::GetProcAddress(::GetModuleHandle(L"content_shell.exe"),
20 "RegisterNonABICompliantCodeRange"));
21 gin::Debug::CodeRangeDeletedCallback delete_callback =
22 reinterpret_cast<gin::Debug::CodeRangeDeletedCallback>(
23 ::GetProcAddress(::GetModuleHandle(L"content_shell.exe"),
24 "UnregisterNonABICompliantCodeRange"));
25 if (create_callback && delete_callback) {
26 gin::Debug::SetCodeRangeCreatedCallback(create_callback);
27 gin::Debug::SetCodeRangeDeletedCallback(delete_callback);
29 #endif
32 } // namespace v8_breakpad_support