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

Side by Side Diff: remoting/host/elevated_controller_module_win.cc

Issue 10535082: /C++ readability/ - Make Chromoting Host report crashes to Breakpad (Windows only). The user must e… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <atlbase.h> 5 #include <atlbase.h>
6 #include <atlcom.h> 6 #include <atlcom.h>
7 #include <atlctl.h> 7 #include <atlctl.h>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "remoting/base/breakpad.h"
13 #include "remoting/host/branding.h" 14 #include "remoting/host/branding.h"
15 #include "remoting/host/breakpad.h"
14 16
15 // MIDL-generated declarations. 17 // MIDL-generated declarations.
16 #include "remoting/host/elevated_controller.h" 18 #include "remoting/host/elevated_controller.h"
17 19
18 namespace remoting { 20 namespace remoting {
19 21
20 class ElevatedControllerModuleWin 22 class ElevatedControllerModuleWin
21 : public ATL::CAtlExeModuleT<ElevatedControllerModuleWin> { 23 : public ATL::CAtlExeModuleT<ElevatedControllerModuleWin> {
22 public: 24 public:
23 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib) 25 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib)
24 }; 26 };
25 27
26 } // namespace remoting 28 } // namespace remoting
27 29
28 30
29 remoting::ElevatedControllerModuleWin _AtlModule; 31 remoting::ElevatedControllerModuleWin _AtlModule;
30 32
31 int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int command) { 33 int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int command) {
34 // Initializes the crash dump reports.
Peter Kasting 2012/06/14 20:16:27 Nit: This comment doesn't add anything to the code
alexeypa (please no reviews) 2012/06/15 18:45:49 Done.
35 if (remoting::IsCrashReportingEnabled()) {
36 remoting::InitializeCrashReporting();
37 }
38
32 CommandLine::Init(0, NULL); 39 CommandLine::Init(0, NULL);
33 40
34 // Register and initialize common controls. 41 // Register and initialize common controls.
35 INITCOMMONCONTROLSEX info; 42 INITCOMMONCONTROLSEX info;
36 info.dwSize = sizeof(info); 43 info.dwSize = sizeof(info);
37 info.dwICC = ICC_STANDARD_CLASSES; 44 info.dwICC = ICC_STANDARD_CLASSES;
38 InitCommonControlsEx(&info); 45 InitCommonControlsEx(&info);
39 46
40 // This object instance is required by Chrome code (for example, 47 // This object instance is required by Chrome code (for example,
41 // FilePath, LazyInstance, MessageLoop). 48 // FilePath, LazyInstance, MessageLoop).
42 base::AtExitManager exit_manager; 49 base::AtExitManager exit_manager;
43 50
44 // Write logs to the application profile directory. 51 // Write logs to the application profile directory.
45 FilePath debug_log = remoting::GetConfigDir(). 52 FilePath debug_log = remoting::GetConfigDir().
46 Append(FILE_PATH_LITERAL("debug.log")); 53 Append(FILE_PATH_LITERAL("debug.log"));
47 InitLogging(debug_log.value().c_str(), 54 InitLogging(debug_log.value().c_str(),
48 logging::LOG_ONLY_TO_FILE, 55 logging::LOG_ONLY_TO_FILE,
49 logging::DONT_LOCK_LOG_FILE, 56 logging::DONT_LOCK_LOG_FILE,
50 logging::APPEND_TO_OLD_LOG_FILE, 57 logging::APPEND_TO_OLD_LOG_FILE,
51 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 58 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
52 59
53 return _AtlModule.WinMain(command); 60 return _AtlModule.WinMain(command);
54 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698