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