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

Side by Side Diff: chrome_frame/chrome_tab.cc

Issue 264068: Refactoring of crash reporting code in Chrome Frame... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/chrome_launcher.cc ('k') | chrome_frame/crash_report.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/at_exit.h" 6 #include "base/at_exit.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/registry.h" 12 #include "base/registry.h"
13 #include "base/string_piece.h" 13 #include "base/string_piece.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/sys_string_conversions.h" 15 #include "base/sys_string_conversions.h"
16 #include "base/win_util.h" 16 #include "base/win_util.h"
17 #include "chrome/common/chrome_constants.h" 17 #include "chrome/common/chrome_constants.h"
18 #include "grit/chrome_frame_resources.h" 18 #include "grit/chrome_frame_resources.h"
19 #include "chrome_frame/bho.h" 19 #include "chrome_frame/bho.h"
20 #include "chrome_frame/chrome_frame_automation.h" 20 #include "chrome_frame/chrome_frame_automation.h"
21 #include "chrome_frame/chrome_frame_reporting.h"
21 #include "chrome_frame/chrome_launcher.h" 22 #include "chrome_frame/chrome_launcher.h"
22 #include "chrome_frame/crash_report.h"
23 #include "chrome_frame/resource.h" 23 #include "chrome_frame/resource.h"
24 #include "chrome_frame/utils.h" 24 #include "chrome_frame/utils.h"
25 25
26 // Include without path to make GYP build see it. 26 // Include without path to make GYP build see it.
27 #include "chrome_tab.h" // NOLINT 27 #include "chrome_tab.h" // NOLINT
28 #include <atlsecurity.h> 28 #include <atlsecurity.h>
29 29
30 static const wchar_t kBhoRegistryPath[] = 30 static const wchar_t kBhoRegistryPath[] =
31 L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" 31 L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
32 L"\\Browser Helper Objects"; 32 L"\\Browser Helper Objects";
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 extern "C" BOOL WINAPI DllMain(HINSTANCE instance, 117 extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
118 DWORD reason, 118 DWORD reason,
119 LPVOID reserved) { 119 LPVOID reserved) {
120 UNREFERENCED_PARAMETER(instance); 120 UNREFERENCED_PARAMETER(instance);
121 if (reason == DLL_PROCESS_ATTACH) { 121 if (reason == DLL_PROCESS_ATTACH) {
122 #ifndef NDEBUG 122 #ifndef NDEBUG
123 // Silence traces from the ATL registrar to reduce the log noise. 123 // Silence traces from the ATL registrar to reduce the log noise.
124 ATL::CTrace::s_trace.ChangeCategory(atlTraceRegistrar, 0, 124 ATL::CTrace::s_trace.ChangeCategory(atlTraceRegistrar, 0,
125 ATLTRACESTATUS_DISABLED); 125 ATLTRACESTATUS_DISABLED);
126 #endif 126 #endif
127 InitializeCrashReporting(false, false); 127 InitializeCrashReporting();
128 g_exit_manager = new base::AtExitManager(); 128 g_exit_manager = new base::AtExitManager();
129 CommandLine::Init(0, NULL); 129 CommandLine::Init(0, NULL);
130 logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 130 logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
131 logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE); 131 logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE);
132 } else if (reason == DLL_PROCESS_DETACH) { 132 } else if (reason == DLL_PROCESS_DETACH) {
133 g_patch_helper.UnpatchIfNeeded(); 133 g_patch_helper.UnpatchIfNeeded();
134 delete g_exit_manager; 134 delete g_exit_manager;
135 g_exit_manager = NULL; 135 g_exit_manager = NULL;
136 ShutdownCrashReporting(); 136 ShutdownCrashReporting();
137 } 137 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 sd.GetDacl(&new_dacl); 486 sd.GetDacl(&new_dacl);
487 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); 487 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ);
488 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { 488 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) {
489 result = SetOrDeleteMimeHandlerKey(enable); 489 result = SetOrDeleteMimeHandlerKey(enable);
490 } 490 }
491 } 491 }
492 492
493 backup.RestoreSecurity(object_name.c_str()); 493 backup.RestoreSecurity(object_name.c_str());
494 return result; 494 return result;
495 } 495 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_launcher.cc ('k') | chrome_frame/crash_report.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698