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

Side by Side Diff: remoting/host/win/elevated_controller_module.cc

Issue 12179013: Revert 180433 because build\some.gyp was added to the CL by mistake. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 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 #include "remoting/host/win/elevated_controller_module.h"
6
7 #include <atlbase.h> 5 #include <atlbase.h>
8 #include <atlcom.h> 6 #include <atlcom.h>
9 #include <atlctl.h> 7 #include <atlctl.h>
10 8
11 #include "base/at_exit.h" 9 #include "base/at_exit.h"
12 #include "base/command_line.h" 10 #include "base/command_line.h"
13 #include "remoting/base/breakpad.h" 11 #include "remoting/base/breakpad.h"
14 #include "remoting/host/logging.h" 12 #include "remoting/host/logging.h"
15 #include "remoting/host/usage_stats_consent.h" 13 #include "remoting/host/usage_stats_consent.h"
14
15 // MIDL-generated declarations.
16 #include "remoting/host/win/elevated_controller.h" 16 #include "remoting/host/win/elevated_controller.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 class ElevatedControllerModule 20 class ElevatedControllerModule
21 : public ATL::CAtlExeModuleT<ElevatedControllerModule> { 21 : public ATL::CAtlExeModuleT<ElevatedControllerModule> {
22 public: 22 public:
23 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib) 23 DECLARE_LIBID(LIBID_ChromotingElevatedControllerLib)
24 }; 24 };
25 25
26 int ElevatedControllerMain() { 26 } // namespace remoting
27
28
29 remoting::ElevatedControllerModule _AtlModule;
30
31 int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int command) {
27 #ifdef OFFICIAL_BUILD 32 #ifdef OFFICIAL_BUILD
28 if (IsUsageStatsAllowed()) { 33 if (remoting::IsUsageStatsAllowed()) {
29 InitializeCrashReporting(); 34 remoting::InitializeCrashReporting();
30 } 35 }
31 #endif // OFFICIAL_BUILD 36 #endif // OFFICIAL_BUILD
32 37
33 CommandLine::Init(0, NULL); 38 CommandLine::Init(0, NULL);
34 39
35 // Register and initialize common controls. 40 // Register and initialize common controls.
36 INITCOMMONCONTROLSEX info; 41 INITCOMMONCONTROLSEX info;
37 info.dwSize = sizeof(info); 42 info.dwSize = sizeof(info);
38 info.dwICC = ICC_STANDARD_CLASSES; 43 info.dwICC = ICC_STANDARD_CLASSES;
39 InitCommonControlsEx(&info); 44 InitCommonControlsEx(&info);
40 45
41 // This object instance is required by Chrome code (for example, 46 // This object instance is required by Chrome code (for example,
42 // FilePath, LazyInstance, MessageLoop). 47 // FilePath, LazyInstance, MessageLoop).
43 base::AtExitManager exit_manager; 48 base::AtExitManager exit_manager;
44 49
45 InitHostLogging(); 50 remoting::InitHostLogging();
46 51
47 ElevatedControllerModule module; 52 return _AtlModule.WinMain(command);
48 return module.WinMain(SW_HIDE);
49 } 53 }
50
51 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/elevated_controller_module.h ('k') | remoting/host/win/elevated_controller_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698