| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 namespace { | 303 namespace { |
| 304 | 304 |
| 305 // Parses the given command line for notifier options. | 305 // Parses the given command line for notifier options. |
| 306 notifier::NotifierOptions ParseNotifierOptions( | 306 notifier::NotifierOptions ParseNotifierOptions( |
| 307 const CommandLine& command_line, | 307 const CommandLine& command_line, |
| 308 const scoped_refptr<net::URLRequestContextGetter>& | 308 const scoped_refptr<net::URLRequestContextGetter>& |
| 309 request_context_getter) { | 309 request_context_getter) { |
| 310 notifier::NotifierOptions notifier_options; | 310 notifier::NotifierOptions notifier_options; |
| 311 notifier_options.request_context_getter = request_context_getter; | 311 notifier_options.request_context_getter = request_context_getter; |
| 312 notifier_options.auth_mechanism ="X-OAUTH2"; |
| 312 | 313 |
| 313 if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) { | 314 if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) { |
| 314 notifier_options.xmpp_host_port = | 315 notifier_options.xmpp_host_port = |
| 315 net::HostPortPair::FromString( | 316 net::HostPortPair::FromString( |
| 316 command_line.GetSwitchValueASCII( | 317 command_line.GetSwitchValueASCII( |
| 317 switches::kSyncNotificationHostPort)); | 318 switches::kSyncNotificationHostPort)); |
| 318 DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString() | 319 DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString() |
| 319 << " for test sync notification server."; | 320 << " for test sync notification server."; |
| 320 } | 321 } |
| 321 | 322 |
| (...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 DVLOG(1) << "Connection status changed: " | 1678 DVLOG(1) << "Connection status changed: " |
| 1678 << syncer::ConnectionStatusToString(status); | 1679 << syncer::ConnectionStatusToString(status); |
| 1679 frontend_->OnConnectionStatusChange(status); | 1680 frontend_->OnConnectionStatusChange(status); |
| 1680 } | 1681 } |
| 1681 | 1682 |
| 1682 #undef SDVLOG | 1683 #undef SDVLOG |
| 1683 | 1684 |
| 1684 #undef SLOG | 1685 #undef SLOG |
| 1685 | 1686 |
| 1686 } // namespace browser_sync | 1687 } // namespace browser_sync |
| OLD | NEW |