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

Side by Side Diff: remoting/host/remoting_me2me_host.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: Removing omaha namespace. 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 a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/files/file_path_watcher.h" 15 #include "base/files/file_path_watcher.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/message_loop.h" 18 #include "base/message_loop.h"
19 #include "base/synchronization/waitable_event.h" 19 #include "base/synchronization/waitable_event.h"
20 #include "base/threading/thread.h" 20 #include "base/threading/thread.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "crypto/nss_util.h" 22 #include "crypto/nss_util.h"
23 #include "net/base/network_change_notifier.h" 23 #include "net/base/network_change_notifier.h"
24 #include "remoting/base/breakpad.h"
24 #include "remoting/base/constants.h" 25 #include "remoting/base/constants.h"
25 #include "remoting/host/branding.h" 26 #include "remoting/host/branding.h"
26 #include "remoting/host/constants.h" 27 #include "remoting/host/constants.h"
27 #include "remoting/host/capturer.h" 28 #include "remoting/host/capturer.h"
28 #include "remoting/host/chromoting_host.h" 29 #include "remoting/host/chromoting_host.h"
29 #include "remoting/host/chromoting_host_context.h" 30 #include "remoting/host/chromoting_host_context.h"
30 #include "remoting/host/desktop_environment.h" 31 #include "remoting/host/desktop_environment.h"
31 #include "remoting/host/event_executor.h" 32 #include "remoting/host/event_executor.h"
32 #include "remoting/host/heartbeat_sender.h" 33 #include "remoting/host/heartbeat_sender.h"
33 #include "remoting/host/host_config.h" 34 #include "remoting/host/host_config.h"
34 #include "remoting/host/host_event_logger.h" 35 #include "remoting/host/host_event_logger.h"
35 #include "remoting/host/host_user_interface.h" 36 #include "remoting/host/host_user_interface.h"
36 #include "remoting/host/json_host_config.h" 37 #include "remoting/host/json_host_config.h"
37 #include "remoting/host/log_to_server.h" 38 #include "remoting/host/log_to_server.h"
38 #include "remoting/host/policy_hack/nat_policy.h" 39 #include "remoting/host/policy_hack/nat_policy.h"
39 #include "remoting/host/signaling_connector.h" 40 #include "remoting/host/signaling_connector.h"
41 #include "remoting/host/usage_stats_consent.h"
40 #include "remoting/jingle_glue/xmpp_signal_strategy.h" 42 #include "remoting/jingle_glue/xmpp_signal_strategy.h"
41 #include "remoting/protocol/me2me_host_authenticator_factory.h" 43 #include "remoting/protocol/me2me_host_authenticator_factory.h"
42 44
43 #if defined(OS_MACOSX) 45 #if defined(OS_MACOSX)
44 #include "base/mac/scoped_nsautorelease_pool.h" 46 #include "base/mac/scoped_nsautorelease_pool.h"
45 #include "remoting/host/sighup_listener_mac.h" 47 #include "remoting/host/sighup_listener_mac.h"
46 #endif 48 #endif
47 // N.B. OS_WIN is defined by including src/base headers. 49 // N.B. OS_WIN is defined by including src/base headers.
48 #if defined(OS_WIN) 50 #if defined(OS_WIN)
49 #include <commctrl.h> 51 #include <commctrl.h>
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 return me2me_host.Run(); 552 return me2me_host.Run();
551 } 553 }
552 554
553 #if defined(OS_WIN) 555 #if defined(OS_WIN)
554 HMODULE g_hModule = NULL; 556 HMODULE g_hModule = NULL;
555 557
556 int CALLBACK WinMain(HINSTANCE instance, 558 int CALLBACK WinMain(HINSTANCE instance,
557 HINSTANCE previous_instance, 559 HINSTANCE previous_instance,
558 LPSTR command_line, 560 LPSTR command_line,
559 int show_command) { 561 int show_command) {
562 if (remoting::IsCrashReportingEnabled()) {
563 remoting::InitializeCrashReporting();
564 }
565
560 g_hModule = instance; 566 g_hModule = instance;
561 567
562 // Register and initialize common controls. 568 // Register and initialize common controls.
563 INITCOMMONCONTROLSEX info; 569 INITCOMMONCONTROLSEX info;
564 info.dwSize = sizeof(info); 570 info.dwSize = sizeof(info);
565 info.dwICC = ICC_STANDARD_CLASSES; 571 info.dwICC = ICC_STANDARD_CLASSES;
566 InitCommonControlsEx(&info); 572 InitCommonControlsEx(&info);
567 573
568 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. 574 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs.
569 SetProcessDPIAware(); 575 SetProcessDPIAware();
570 576
571 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting 577 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting
572 // the command line from GetCommandLineW(), so we can safely pass NULL here. 578 // the command line from GetCommandLineW(), so we can safely pass NULL here.
573 return main(0, NULL); 579 return main(0, NULL);
574 } 580 }
575 581
576 #endif // defined(OS_WIN) 582 #endif // defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698