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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 StartHost(); | 350 StartHost(); |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
354 void StartHost() { | 354 void StartHost() { |
355 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 355 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
356 DCHECK(!host_); | 356 DCHECK(!host_); |
357 | 357 |
358 if (!signal_strategy_.get()) { | 358 if (!signal_strategy_.get()) { |
359 signal_strategy_.reset( | 359 signal_strategy_.reset( |
360 new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_, | 360 new XmppSignalStrategy(context_->url_request_context_getter(), |
361 xmpp_auth_token_, xmpp_auth_service_)); | 361 xmpp_login_, xmpp_auth_token_, |
| 362 xmpp_auth_service_)); |
362 | 363 |
363 signaling_connector_.reset(new SignalingConnector( | 364 signaling_connector_.reset(new SignalingConnector( |
364 signal_strategy_.get(), | 365 signal_strategy_.get(), |
365 base::Bind(&HostProcess::OnAuthFailed, base::Unretained(this)))); | 366 base::Bind(&HostProcess::OnAuthFailed, base::Unretained(this)))); |
366 | 367 |
367 if (!oauth_refresh_token_.empty()) { | 368 if (!oauth_refresh_token_.empty()) { |
368 OAuthClientInfo client_info = { | 369 OAuthClientInfo client_info = { |
369 kUnofficialOAuth2ClientId, | 370 kUnofficialOAuth2ClientId, |
370 kUnofficialOAuth2ClientSecret | 371 kUnofficialOAuth2ClientSecret |
371 }; | 372 }; |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 user32.GetFunctionPointer("SetProcessDPIAware")); | 619 user32.GetFunctionPointer("SetProcessDPIAware")); |
619 set_process_dpi_aware(); | 620 set_process_dpi_aware(); |
620 } | 621 } |
621 | 622 |
622 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 623 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
623 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 624 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
624 return main(0, NULL); | 625 return main(0, NULL); |
625 } | 626 } |
626 | 627 |
627 #endif // defined(OS_WIN) | 628 #endif // defined(OS_WIN) |
OLD | NEW |