summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_dll_main.cc
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-22 17:11:04 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-22 17:11:04 +0000
commit0f8a6b4de386b469859f6cd12c0ba091453c9a4d (patch)
tree3d1b0af7d6cbd80872d1178b6f2d62a20a24e9f6 /chrome/app/chrome_dll_main.cc
parent9bbb0b88f274f767358644dd97b1ee0c9604010b (diff)
downloadchromium_src-0f8a6b4de386b469859f6cd12c0ba091453c9a4d.zip
chromium_src-0f8a6b4de386b469859f6cd12c0ba091453c9a4d.tar.gz
chromium_src-0f8a6b4de386b469859f6cd12c0ba091453c9a4d.tar.bz2
Use the new dll injection blocking api of the sandbox to block
the loading of dlls that cause renderer crashes. - Remove the old FreeLibrary() method Review URL: http://codereview.chromium.org/2458 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r--chrome/app/chrome_dll_main.cc29
1 files changed, 0 insertions, 29 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 01d68c0..0f0b29f 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -86,27 +86,6 @@ void ChromeAssert(const std::string& str) {
#pragma optimize("", on)
-
-// Try to unload DLLs that malfunction with the sandboxed processes.
-static void EvictTroublesomeDlls() {
- const wchar_t* troublesome_dlls[] = {
- L"smumhook.dll", // spyware doctor version 5 and above.
- NULL // Must be null. Here you can add with the debugger.
- };
-
- for(int ix = 0; ix != arraysize(troublesome_dlls); ++ix) {
- if (!troublesome_dlls[ix])
- break;
- HMODULE module = ::GetModuleHandleW(troublesome_dlls[ix]);
- if (module) {
- LOG(WARNING) << "dll to evict found: " << ix;
- if (::FreeLibrary(module)) {
- DCHECK(NULL == ::GetModuleHandleW(troublesome_dlls[ix]));
- }
- }
- }
-}
-
} // namespace
DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
@@ -184,8 +163,6 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
std::wstring process_type =
parsed_command_line.GetSwitchValue(switches::kProcessType);
- bool do_dll_eviction = false;
-
// Checks if the sandbox is enabled in this process and initializes it if this
// is the case. The crash handler depends on this so it has to be done before
// its initialization.
@@ -194,7 +171,6 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
(process_type == switches::kPluginProcess &&
parsed_command_line.HasSwitch(switches::kSafePlugins))) {
target_services->Init();
- do_dll_eviction = true;
}
}
@@ -235,11 +211,6 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
ResourceBundle::InitSharedInstance(std::wstring());
}
- // Eviction of injected DLLs is done early enough that it is likely
- // to only cover DLLs injected by means of appInit_dlls registry key.
- if (do_dll_eviction)
- EvictTroublesomeDlls();
-
startup_timer.Stop(); // End of Startup Time Measurement.
int rv;