OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/setup/me2me_native_messaging_host_main.h" | 5 #include "remoting/host/setup/me2me_native_messaging_host_main.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
9 #include "base/files/file.h" | 11 #include "base/files/file.h" |
10 #include "base/i18n/icu_util.h" | 12 #include "base/i18n/icu_util.h" |
11 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
13 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
14 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| 17 #include "build/build_config.h" |
15 #include "net/url_request/url_fetcher.h" | 18 #include "net/url_request/url_fetcher.h" |
16 #include "remoting/base/breakpad.h" | 19 #include "remoting/base/breakpad.h" |
17 #include "remoting/base/url_request_context_getter.h" | 20 #include "remoting/base/url_request_context_getter.h" |
18 #include "remoting/host/host_exit_codes.h" | 21 #include "remoting/host/host_exit_codes.h" |
19 #include "remoting/host/logging.h" | 22 #include "remoting/host/logging.h" |
20 #include "remoting/host/native_messaging/pipe_messaging_channel.h" | 23 #include "remoting/host/native_messaging/pipe_messaging_channel.h" |
21 #include "remoting/host/pairing_registry_delegate.h" | 24 #include "remoting/host/pairing_registry_delegate.h" |
22 #include "remoting/host/setup/gaia_oauth_client.h" | 25 #include "remoting/host/setup/gaia_oauth_client.h" |
23 #include "remoting/host/setup/me2me_native_messaging_host.h" | 26 #include "remoting/host/setup/me2me_native_messaging_host.h" |
24 #include "remoting/host/usage_stats_consent.h" | 27 #include "remoting/host/usage_stats_consent.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 base::MessageLoopForUI message_loop; | 113 base::MessageLoopForUI message_loop; |
111 base::RunLoop run_loop; | 114 base::RunLoop run_loop; |
112 | 115 |
113 scoped_refptr<DaemonController> daemon_controller = | 116 scoped_refptr<DaemonController> daemon_controller = |
114 DaemonController::Create(); | 117 DaemonController::Create(); |
115 | 118 |
116 // Pass handle of the native view to the controller so that the UAC prompts | 119 // Pass handle of the native view to the controller so that the UAC prompts |
117 // are focused properly. | 120 // are focused properly. |
118 const base::CommandLine* command_line = | 121 const base::CommandLine* command_line = |
119 base::CommandLine::ForCurrentProcess(); | 122 base::CommandLine::ForCurrentProcess(); |
120 int64 native_view_handle = 0; | 123 int64_t native_view_handle = 0; |
121 if (command_line->HasSwitch(kParentWindowSwitchName)) { | 124 if (command_line->HasSwitch(kParentWindowSwitchName)) { |
122 std::string native_view = | 125 std::string native_view = |
123 command_line->GetSwitchValueASCII(kParentWindowSwitchName); | 126 command_line->GetSwitchValueASCII(kParentWindowSwitchName); |
124 if (!base::StringToInt64(native_view, &native_view_handle)) { | 127 if (!base::StringToInt64(native_view, &native_view_handle)) { |
125 LOG(WARNING) << "Invalid parameter value --" << kParentWindowSwitchName | 128 LOG(WARNING) << "Invalid parameter value --" << kParentWindowSwitchName |
126 << "=" << native_view; | 129 << "=" << native_view; |
127 } | 130 } |
128 } | 131 } |
129 | 132 |
130 base::File read_file; | 133 base::File read_file; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // This object instance is required by Chrome code (such as MessageLoop). | 278 // This object instance is required by Chrome code (such as MessageLoop). |
276 base::AtExitManager exit_manager; | 279 base::AtExitManager exit_manager; |
277 | 280 |
278 base::CommandLine::Init(argc, argv); | 281 base::CommandLine::Init(argc, argv); |
279 remoting::InitHostLogging(); | 282 remoting::InitHostLogging(); |
280 | 283 |
281 return StartMe2MeNativeMessagingHost(); | 284 return StartMe2MeNativeMessagingHost(); |
282 } | 285 } |
283 | 286 |
284 } // namespace remoting | 287 } // namespace remoting |
OLD | NEW |