| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // chrome_tab.cc : Implementation of DLL Exports. | 5 // chrome_tab.cc : Implementation of DLL Exports. |
| 6 | 6 |
| 7 // Include without path to make GYP build see it. | 7 // Include without path to make GYP build see it. |
| 8 #include "chrome_tab.h" // NOLINT | 8 #include "chrome_tab.h" // NOLINT |
| 9 | 9 |
| 10 #include <atlsecurity.h> | 10 #include <atlsecurity.h> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 extern "C" BOOL WINAPI DllMain(HINSTANCE instance, | 119 extern "C" BOOL WINAPI DllMain(HINSTANCE instance, |
| 120 DWORD reason, | 120 DWORD reason, |
| 121 LPVOID reserved) { | 121 LPVOID reserved) { |
| 122 UNREFERENCED_PARAMETER(instance); | 122 UNREFERENCED_PARAMETER(instance); |
| 123 if (reason == DLL_PROCESS_ATTACH) { | 123 if (reason == DLL_PROCESS_ATTACH) { |
| 124 #ifndef NDEBUG | 124 #ifndef NDEBUG |
| 125 // Silence traces from the ATL registrar to reduce the log noise. | 125 // Silence traces from the ATL registrar to reduce the log noise. |
| 126 ATL::CTrace::s_trace.ChangeCategory(atlTraceRegistrar, 0, | 126 ATL::CTrace::s_trace.ChangeCategory(atlTraceRegistrar, 0, |
| 127 ATLTRACESTATUS_DISABLED); | 127 ATLTRACESTATUS_DISABLED); |
| 128 #endif | 128 #endif |
| 129 CommandLine::Init(0, NULL); |
| 129 InitializeCrashReporting(); | 130 InitializeCrashReporting(); |
| 130 g_exit_manager = new base::AtExitManager(); | 131 g_exit_manager = new base::AtExitManager(); |
| 131 CommandLine::Init(0, NULL); | |
| 132 logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 132 logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
| 133 logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE); | 133 logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE); |
| 134 } else if (reason == DLL_PROCESS_DETACH) { | 134 } else if (reason == DLL_PROCESS_DETACH) { |
| 135 g_patch_helper.UnpatchIfNeeded(); | 135 g_patch_helper.UnpatchIfNeeded(); |
| 136 delete g_exit_manager; | 136 delete g_exit_manager; |
| 137 g_exit_manager = NULL; | 137 g_exit_manager = NULL; |
| 138 ShutdownCrashReporting(); | 138 ShutdownCrashReporting(); |
| 139 } | 139 } |
| 140 return _AtlModule.DllMain(reason, reserved); | 140 return _AtlModule.DllMain(reason, reserved); |
| 141 } | 141 } |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 sd.GetDacl(&new_dacl); | 480 sd.GetDacl(&new_dacl); |
| 481 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); | 481 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); |
| 482 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { | 482 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { |
| 483 result = SetOrDeleteMimeHandlerKey(enable); | 483 result = SetOrDeleteMimeHandlerKey(enable); |
| 484 } | 484 } |
| 485 } | 485 } |
| 486 | 486 |
| 487 backup.RestoreSecurity(object_name.c_str()); | 487 backup.RestoreSecurity(object_name.c_str()); |
| 488 return result; | 488 return result; |
| 489 } | 489 } |
| OLD | NEW |