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

Side by Side Diff: remoting/host/host_service_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: Fixing a bad merge. 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 // This file implements the Windows service controlling Me2Me host processes 5 // This file implements the Windows service controlling Me2Me host processes
6 // running within user sessions. 6 // running within user sessions.
7 7
8 #include "remoting/host/host_service_win.h" 8 #include "remoting/host/host_service_win.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
11 #include <wtsapi32.h> 11 #include <wtsapi32.h>
12 #include <stdio.h> 12 #include <stdio.h>
13 13
14 #include "base/at_exit.h" 14 #include "base/at_exit.h"
15 #include "base/base_paths.h" 15 #include "base/base_paths.h"
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/file_util.h" 18 #include "base/file_util.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/message_loop.h" 20 #include "base/message_loop.h"
21 #include "base/path_service.h" 21 #include "base/path_service.h"
22 #include "base/stringize_macros.h" 22 #include "base/stringize_macros.h"
23 #include "base/stringprintf.h" 23 #include "base/stringprintf.h"
24 #include "base/threading/thread.h" 24 #include "base/threading/thread.h"
25 #include "base/win/wrapped_window_proc.h" 25 #include "base/win/wrapped_window_proc.h"
26 #include "remoting/base/breakpad.h" 26 #include "remoting/base/breakpad.h"
27 #include "remoting/base/scoped_sc_handle_win.h" 27 #include "remoting/base/scoped_sc_handle_win.h"
28 #include "remoting/host/branding.h" 28 #include "remoting/host/branding.h"
29 #include "remoting/host/breakpad.h"
30 #include "remoting/host/host_service_resource.h" 29 #include "remoting/host/host_service_resource.h"
30 #include "remoting/host/usage_stats_consent.h"
31 #include "remoting/host/wts_console_observer_win.h" 31 #include "remoting/host/wts_console_observer_win.h"
32 #include "remoting/host/wts_session_process_launcher_win.h" 32 #include "remoting/host/wts_session_process_launcher_win.h"
33 33
34 using base::StringPrintf; 34 using base::StringPrintf;
35 35
36 namespace { 36 namespace {
37 37
38 // Session id that does not represent any session. 38 // Session id that does not represent any session.
39 const uint32 kInvalidSession = 0xffffffff; 39 const uint32 kInvalidSession = 0xffffffff;
40 40
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 405
406 default: 406 default:
407 return DefWindowProc(hwnd, message, wparam, lparam); 407 return DefWindowProc(hwnd, message, wparam, lparam);
408 } 408 }
409 } 409 }
410 410
411 } // namespace remoting 411 } // namespace remoting
412 412
413 int main(int argc, char** argv) { 413 int main(int argc, char** argv) {
414 // Initializes the crash dump reports.
415 if (remoting::IsCrashReportingEnabled()) { 414 if (remoting::IsCrashReportingEnabled()) {
416 remoting::InitializeCrashReporting(); 415 remoting::InitializeCrashReporting();
417 } 416 }
418 417
419 CommandLine::Init(argc, argv); 418 CommandLine::Init(argc, argv);
420 419
421 // This object instance is required by Chrome code (for example, 420 // This object instance is required by Chrome code (for example,
422 // FilePath, LazyInstance, MessageLoop). 421 // FilePath, LazyInstance, MessageLoop).
423 base::AtExitManager exit_manager; 422 base::AtExitManager exit_manager;
424 423
(...skipping 15 matching lines...) Expand all
440 } 439 }
441 440
442 remoting::HostService* service = remoting::HostService::GetInstance(); 441 remoting::HostService* service = remoting::HostService::GetInstance();
443 if (!service->InitWithCommandLine(command_line)) { 442 if (!service->InitWithCommandLine(command_line)) {
444 usage(argv[0]); 443 usage(argv[0]);
445 return kUsageExitCode; 444 return kUsageExitCode;
446 } 445 }
447 446
448 return service->Run(); 447 return service->Run();
449 } 448 }
OLDNEW
« no previous file with comments | « remoting/host/elevated_controller_module_win.cc ('k') | remoting/host/plugin/daemon_installer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698