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