summaryrefslogtreecommitdiffstats
path: root/chrome_frame/pin_module.h
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-14 21:52:37 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-14 21:52:37 +0000
commitea8ab2aa7cb4e3b441fa6df657d140d84e946c8e (patch)
treea4110812afb096198beb54635c24f348f71587cc /chrome_frame/pin_module.h
parent222885dd16eb6cf90212adabdecab51cafa529ca (diff)
downloadchromium_src-ea8ab2aa7cb4e3b441fa6df657d140d84e946c8e.zip
chromium_src-ea8ab2aa7cb4e3b441fa6df657d140d84e946c8e.tar.gz
chromium_src-ea8ab2aa7cb4e3b441fa6df657d140d84e946c8e.tar.bz2
Start and stop crash reporting outside of the loader lock.
Instead of using DllMain to start/stop crash reporting, it is now done by way of a specialization of a new ScopedInitializationManager template. Instances of this specialization are created on the stack in entrypoints to the DLL (for registration or to get a COM object). The lifetime of crash reporting is ordinarily bound to the lifetime of the ATL module. The exception to this is when the module is pinned, at which point crash reporting is also pinned. This change removes the breakpad_handler_dll target (by reverting http://crrev.com/70898) since it is no longer needed. BUG=163455 TEST=install chrome frame and notice that installation doesn't block for 1 minute while npchrome_frame.dll is registered. Review URL: https://chromiumcodereview.appspot.com/12521002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/pin_module.h')
-rw-r--r--chrome_frame/pin_module.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome_frame/pin_module.h b/chrome_frame/pin_module.h
new file mode 100644
index 0000000..8b4b4e8
--- /dev/null
+++ b/chrome_frame/pin_module.h
@@ -0,0 +1,21 @@
+// Copyright 2013 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.
+
+#ifndef CHROME_FRAME_PIN_MODULE_H_
+#define CHROME_FRAME_PIN_MODULE_H_
+
+namespace chrome_frame {
+
+typedef void (*PinModuleCallbackFn)(void);
+
+// Sets a callback function to be invoked when the module is pinned.
+void SetPinModuleCallback(PinModuleCallbackFn callback);
+
+// Utility function that prevents the current module from ever being unloaded.
+// Call if you make irreversible patches.
+void PinModule();
+
+} // namespace chrome_frame
+
+#endif // CHROME_FRAME_PIN_MODULE_H_