| 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 #include <cstddef> | 5 #include <cstddef> |
| 6 #include <cstdio> | 6 #include <cstdio> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void LogUnrecoverableErrorContext() { | 188 void LogUnrecoverableErrorContext() { |
| 189 base::debug::StackTrace().Print(); | 189 base::debug::StackTrace().Print(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 notifier::NotifierOptions ParseNotifierOptions( | 192 notifier::NotifierOptions ParseNotifierOptions( |
| 193 const CommandLine& command_line, | 193 const CommandLine& command_line, |
| 194 const scoped_refptr<net::URLRequestContextGetter>& | 194 const scoped_refptr<net::URLRequestContextGetter>& |
| 195 request_context_getter) { | 195 request_context_getter) { |
| 196 notifier::NotifierOptions notifier_options; | 196 notifier::NotifierOptions notifier_options; |
| 197 notifier_options.request_context_getter = request_context_getter; | 197 notifier_options.request_context_getter = request_context_getter; |
| 198 notifier_options.auth_mechanism = "X-OAUTH2"; |
| 198 | 199 |
| 199 if (command_line.HasSwitch(kXmppHostPortSwitch)) { | 200 if (command_line.HasSwitch(kXmppHostPortSwitch)) { |
| 200 notifier_options.xmpp_host_port = | 201 notifier_options.xmpp_host_port = |
| 201 net::HostPortPair::FromString( | 202 net::HostPortPair::FromString( |
| 202 command_line.GetSwitchValueASCII(kXmppHostPortSwitch)); | 203 command_line.GetSwitchValueASCII(kXmppHostPortSwitch)); |
| 203 LOG(INFO) << "Using " << notifier_options.xmpp_host_port.ToString() | 204 LOG(INFO) << "Using " << notifier_options.xmpp_host_port.ToString() |
| 204 << " for test sync notification server."; | 205 << " for test sync notification server."; |
| 205 } | 206 } |
| 206 | 207 |
| 207 notifier_options.try_ssltcp_first = | 208 notifier_options.try_ssltcp_first = |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 io_thread.Stop(); | 387 io_thread.Stop(); |
| 387 return 0; | 388 return 0; |
| 388 } | 389 } |
| 389 | 390 |
| 390 } // namespace | 391 } // namespace |
| 391 } // namespace syncer | 392 } // namespace syncer |
| 392 | 393 |
| 393 int main(int argc, char* argv[]) { | 394 int main(int argc, char* argv[]) { |
| 394 return syncer::SyncClientMain(argc, argv); | 395 return syncer::SyncClientMain(argc, argv); |
| 395 } | 396 } |
| OLD | NEW |