| OLD | NEW |
| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib) | 25 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib) |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 } // namespace remoting | 28 } // namespace remoting |
| 29 | 29 |
| 30 | 30 |
| 31 remoting::ElevatedControllerModuleWin _AtlModule; | 31 remoting::ElevatedControllerModuleWin _AtlModule; |
| 32 | 32 |
| 33 int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int command) { | 33 int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int command) { |
| 34 if (remoting::IsCrashReportingEnabled()) { | 34 #ifdef OFFICIAL_BUILD |
| 35 if (remoting::IsUsageStatsAllowed()) { |
| 35 remoting::InitializeCrashReporting(); | 36 remoting::InitializeCrashReporting(); |
| 36 } | 37 } |
| 38 #endif // OFFICIAL_BUILD |
| 37 | 39 |
| 38 CommandLine::Init(0, NULL); | 40 CommandLine::Init(0, NULL); |
| 39 | 41 |
| 40 // Register and initialize common controls. | 42 // Register and initialize common controls. |
| 41 INITCOMMONCONTROLSEX info; | 43 INITCOMMONCONTROLSEX info; |
| 42 info.dwSize = sizeof(info); | 44 info.dwSize = sizeof(info); |
| 43 info.dwICC = ICC_STANDARD_CLASSES; | 45 info.dwICC = ICC_STANDARD_CLASSES; |
| 44 InitCommonControlsEx(&info); | 46 InitCommonControlsEx(&info); |
| 45 | 47 |
| 46 // This object instance is required by Chrome code (for example, | 48 // This object instance is required by Chrome code (for example, |
| 47 // FilePath, LazyInstance, MessageLoop). | 49 // FilePath, LazyInstance, MessageLoop). |
| 48 base::AtExitManager exit_manager; | 50 base::AtExitManager exit_manager; |
| 49 | 51 |
| 50 // Write logs to the application profile directory. | 52 // Write logs to the application profile directory. |
| 51 FilePath debug_log = remoting::GetConfigDir(). | 53 FilePath debug_log = remoting::GetConfigDir(). |
| 52 Append(FILE_PATH_LITERAL("debug.log")); | 54 Append(FILE_PATH_LITERAL("debug.log")); |
| 53 InitLogging(debug_log.value().c_str(), | 55 InitLogging(debug_log.value().c_str(), |
| 54 logging::LOG_ONLY_TO_FILE, | 56 logging::LOG_ONLY_TO_FILE, |
| 55 logging::DONT_LOCK_LOG_FILE, | 57 logging::DONT_LOCK_LOG_FILE, |
| 56 logging::APPEND_TO_OLD_LOG_FILE, | 58 logging::APPEND_TO_OLD_LOG_FILE, |
| 57 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 59 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
| 58 | 60 |
| 59 return _AtlModule.WinMain(command); | 61 return _AtlModule.WinMain(command); |
| 60 } | 62 } |
| OLD | NEW |