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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/sync/glue/sync_backend_host.h" | 7 #include "chrome/browser/sync/glue/sync_backend_host.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 namespace { | 301 namespace { |
302 | 302 |
303 // Parses the given command line for notifier options. | 303 // Parses the given command line for notifier options. |
304 notifier::NotifierOptions ParseNotifierOptions( | 304 notifier::NotifierOptions ParseNotifierOptions( |
305 const CommandLine& command_line, | 305 const CommandLine& command_line, |
306 const scoped_refptr<net::URLRequestContextGetter>& | 306 const scoped_refptr<net::URLRequestContextGetter>& |
307 request_context_getter) { | 307 request_context_getter) { |
308 notifier::NotifierOptions notifier_options; | 308 notifier::NotifierOptions notifier_options; |
309 notifier_options.request_context_getter = request_context_getter; | 309 notifier_options.request_context_getter = request_context_getter; |
| 310 notifier_options.auth_mechanism = "X-OAUTH2"; |
310 | 311 |
311 if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) { | 312 if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) { |
312 notifier_options.xmpp_host_port = | 313 notifier_options.xmpp_host_port = |
313 net::HostPortPair::FromString( | 314 net::HostPortPair::FromString( |
314 command_line.GetSwitchValueASCII( | 315 command_line.GetSwitchValueASCII( |
315 switches::kSyncNotificationHostPort)); | 316 switches::kSyncNotificationHostPort)); |
316 DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString() | 317 DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString() |
317 << " for test sync notification server."; | 318 << " for test sync notification server."; |
318 } | 319 } |
319 | 320 |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 DVLOG(1) << "Connection status changed: " | 1661 DVLOG(1) << "Connection status changed: " |
1661 << syncer::ConnectionStatusToString(status); | 1662 << syncer::ConnectionStatusToString(status); |
1662 frontend_->OnConnectionStatusChange(status); | 1663 frontend_->OnConnectionStatusChange(status); |
1663 } | 1664 } |
1664 | 1665 |
1665 #undef SDVLOG | 1666 #undef SDVLOG |
1666 | 1667 |
1667 #undef SLOG | 1668 #undef SLOG |
1668 | 1669 |
1669 } // namespace browser_sync | 1670 } // namespace browser_sync |
OLD | NEW |