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

Unified Diff: remoting/host/elevated_controller_module_win.cc

Issue 9953002: The me2me host is now configurable from the web UI on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 8 years, 9 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
Index: remoting/host/elevated_controller_module_win.cc
diff --git a/remoting/host/elevated_controller_module_win.cc b/remoting/host/elevated_controller_module_win.cc
index 16751075a9994927f58639bbe0e1033cd788c135..ba193d12c70c1baa7e0cb188bf27b2f97614cb4a 100644
--- a/remoting/host/elevated_controller_module_win.cc
+++ b/remoting/host/elevated_controller_module_win.cc
@@ -6,6 +6,12 @@
#include <atlcom.h>
#include <atlctl.h>
+#include "base/at_exit.h"
+#include "base/command_line.h"
+#include "base/file_path.h"
+#include "base/logging.h"
+#include "remoting/host/branding.h"
+
// MIDL-generated declarations.
#include <elevated_controller.h>
@@ -23,5 +29,20 @@ class ElevatedControllerModuleWin
remoting::ElevatedControllerModuleWin _AtlModule;
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int command) {
+ CommandLine::Init(0, NULL);
+
+ // This object instance is required by Chrome code (for example,
+ // FilePath, LazyInstance, MessageLoop).
+ base::AtExitManager exit_manager;
+
+ // Write logs to the application profile directory.
+ FilePath debug_log = remoting::GetConfigDir().
+ Append(FILE_PATH_LITERAL("debug.log"));
+ InitLogging(debug_log.value().c_str(),
+ logging::LOG_ONLY_TO_FILE,
+ logging::DONT_LOCK_LOG_FILE,
+ logging::APPEND_TO_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+
return _AtlModule.WinMain(command);
}

Powered by Google App Engine
This is Rietveld 408576698