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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 StartHost(); | 335 StartHost(); |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 void StartHost() { | 339 void StartHost() { |
340 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 340 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
341 DCHECK(!host_); | 341 DCHECK(!host_); |
342 | 342 |
343 if (!signal_strategy_.get()) { | 343 if (!signal_strategy_.get()) { |
344 signal_strategy_.reset( | 344 signal_strategy_.reset( |
345 new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_, | 345 new XmppSignalStrategy(context_->url_request_context_getter(), |
346 xmpp_auth_token_, xmpp_auth_service_)); | 346 xmpp_login_, xmpp_auth_token_, |
| 347 xmpp_auth_service_)); |
347 | 348 |
348 signaling_connector_.reset(new SignalingConnector( | 349 signaling_connector_.reset(new SignalingConnector( |
349 signal_strategy_.get(), | 350 signal_strategy_.get(), |
350 base::Bind(&HostProcess::OnAuthFailed, base::Unretained(this)))); | 351 base::Bind(&HostProcess::OnAuthFailed, base::Unretained(this)))); |
351 | 352 |
352 if (!oauth_refresh_token_.empty()) { | 353 if (!oauth_refresh_token_.empty()) { |
353 OAuthClientInfo client_info = { | 354 OAuthClientInfo client_info = { |
354 kUnofficialOAuth2ClientId, | 355 kUnofficialOAuth2ClientId, |
355 kUnofficialOAuth2ClientSecret | 356 kUnofficialOAuth2ClientSecret |
356 }; | 357 }; |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 user32.GetFunctionPointer("SetProcessDPIAware")); | 604 user32.GetFunctionPointer("SetProcessDPIAware")); |
604 set_process_dpi_aware(); | 605 set_process_dpi_aware(); |
605 } | 606 } |
606 | 607 |
607 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 608 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
608 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 609 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
609 return main(0, NULL); | 610 return main(0, NULL); |
610 } | 611 } |
611 | 612 |
612 #endif // defined(OS_WIN) | 613 #endif // defined(OS_WIN) |
OLD | NEW |