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

Unified Diff: chrome/app/chrome_dll_main.cc

Issue 2458: Use the new dll injection blocking api of the sandbox to block... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/render_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
===================================================================
--- chrome/app/chrome_dll_main.cc (revision 2087)
+++ chrome/app/chrome_dll_main.cc (working copy)
@@ -86,27 +86,6 @@
#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 @@
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 @@
(process_type == switches::kPluginProcess &&
parsed_command_line.HasSwitch(switches::kSafePlugins))) {
target_services->Init();
- do_dll_eviction = true;
}
}
@@ -235,11 +211,6 @@
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;
« no previous file with comments | « no previous file | chrome/browser/render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698