| 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 // 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" |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 558 } |
| 559 | 559 |
| 560 #if defined(OS_WIN) | 560 #if defined(OS_WIN) |
| 561 HMODULE g_hModule = NULL; | 561 HMODULE g_hModule = NULL; |
| 562 | 562 |
| 563 int CALLBACK WinMain(HINSTANCE instance, | 563 int CALLBACK WinMain(HINSTANCE instance, |
| 564 HINSTANCE previous_instance, | 564 HINSTANCE previous_instance, |
| 565 LPSTR command_line, | 565 LPSTR command_line, |
| 566 int show_command) { | 566 int show_command) { |
| 567 // Initializes the crash dump reports. | 567 // Initializes the crash dump reports. |
| 568 if (remoting::IsCrashReportingEnabled()) { | 568 bool allowed; |
| 569 if (remoting::GetUsageStatsConsent(NULL, &allowed) && allowed) { |
| 569 remoting::InitializeCrashReporting(); | 570 remoting::InitializeCrashReporting(); |
| 570 } | 571 } |
| 571 | 572 |
| 572 g_hModule = instance; | 573 g_hModule = instance; |
| 573 | 574 |
| 574 // Register and initialize common controls. | 575 // Register and initialize common controls. |
| 575 INITCOMMONCONTROLSEX info; | 576 INITCOMMONCONTROLSEX info; |
| 576 info.dwSize = sizeof(info); | 577 info.dwSize = sizeof(info); |
| 577 info.dwICC = ICC_STANDARD_CLASSES; | 578 info.dwICC = ICC_STANDARD_CLASSES; |
| 578 InitCommonControlsEx(&info); | 579 InitCommonControlsEx(&info); |
| 579 | 580 |
| 580 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. | 581 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. |
| 581 SetProcessDPIAware(); | 582 SetProcessDPIAware(); |
| 582 | 583 |
| 583 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 584 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
| 584 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 585 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
| 585 return main(0, NULL); | 586 return main(0, NULL); |
| 586 } | 587 } |
| 587 | 588 |
| 588 #endif // defined(OS_WIN) | 589 #endif // defined(OS_WIN) |
| OLD | NEW |