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

Unified Diff: remoting/host/win/host_service.cc

Issue 12189013: Relanding r180433, now without build/some.gyp. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 10 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
« no previous file with comments | « remoting/host/win/host_process_entry_point.cc ('k') | remoting/host/win/host_service.rc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/host_service.cc
diff --git a/remoting/host/win/host_service.cc b/remoting/host/win/host_service.cc
index 51f44649cd7e46e0e27ec94a7cb0fbf65fedbd74..2e0cbf793d0d771bc85b8da95f121fda4744da4b 100644
--- a/remoting/host/win/host_service.cc
+++ b/remoting/host/win/host_service.cc
@@ -11,7 +11,6 @@
#include <shellapi.h>
#include <wtsapi32.h>
-#include "base/at_exit.h"
#include "base/base_paths.h"
#include "base/base_switches.h"
#include "base/bind.h"
@@ -20,12 +19,9 @@
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
-#include "base/stringprintf.h"
#include "base/threading/thread.h"
-#include "base/utf_string_conversions.h"
#include "base/win/wrapped_window_proc.h"
#include "remoting/base/auto_thread.h"
-#include "remoting/base/breakpad.h"
#include "remoting/base/scoped_sc_handle_win.h"
#include "remoting/base/stoppable.h"
#include "remoting/host/branding.h"
@@ -36,16 +32,13 @@
#include "remoting/host/daemon_process.h"
#endif // defined(REMOTING_MULTI_PROCESS)
-#include "remoting/host/usage_stats_consent.h"
-#include "remoting/host/win/host_service_resource.h"
+#include "remoting/host/win/core_resource.h"
#include "remoting/host/win/wts_console_observer.h"
#if !defined(REMOTING_MULTI_PROCESS)
#include "remoting/host/win/wts_console_session_process_driver.h"
#endif // !defined(REMOTING_MULTI_PROCESS)
-using base::StringPrintf;
-
namespace {
// Session id that does not represent any session.
@@ -66,29 +59,11 @@ const char kConsoleSwitchName[] = "console";
// a UAC prompt if necessary.
const char kElevateSwitchName[] = "elevate";
-// "--help" or "--?" prints the usage message.
-const char kHelpSwitchName[] = "help";
-const char kQuestionSwitchName[] = "?";
-
-const wchar_t kUsageMessage[] =
- L"\n"
- L"Usage: %ls [options]\n"
- L"\n"
- L"Options:\n"
- L" --console - Run the service interactively for debugging purposes.\n"
- L" --elevate=<...> - Run <...> elevated.\n"
- L" --help, --? - Print this message.\n";
-
// The command line parameters that should be copied from the service's command
// line when launching an elevated child.
const char* kCopiedSwitchNames[] = {
"host-config", "daemon-pipe", switches::kV, switches::kVModule };
-void usage(const base::FilePath& program_name) {
- LOG(INFO) << StringPrintf(kUsageMessage,
- UTF16ToWide(program_name.value()).c_str());
-}
-
} // namespace
namespace remoting {
@@ -457,39 +432,3 @@ LRESULT CALLBACK HostService::SessionChangeNotificationProc(HWND hwnd,
}
} // namespace remoting
-
-int CALLBACK WinMain(HINSTANCE instance,
- HINSTANCE previous_instance,
- LPSTR raw_command_line,
- int show_command) {
-#ifdef OFFICIAL_BUILD
- if (remoting::IsUsageStatsAllowed()) {
- remoting::InitializeCrashReporting();
- }
-#endif // OFFICIAL_BUILD
-
- // This object instance is required by Chrome code (for example,
- // FilePath, LazyInstance, MessageLoop, Singleton, etc).
- base::AtExitManager exit_manager;
-
- // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting
- // the command line from GetCommandLineW(), so we can safely pass NULL here.
- CommandLine::Init(0, NULL);
-
- remoting::InitHostLogging();
-
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(kHelpSwitchName) ||
- command_line->HasSwitch(kQuestionSwitchName)) {
- usage(command_line->GetProgram());
- return remoting::kSuccessExitCode;
- }
-
- remoting::HostService* service = remoting::HostService::GetInstance();
- if (!service->InitWithCommandLine(command_line)) {
- usage(command_line->GetProgram());
- return remoting::kUsageExitCode;
- }
-
- return service->Run();
-}
« no previous file with comments | « remoting/host/win/host_process_entry_point.cc ('k') | remoting/host/win/host_service.rc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698