OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 std::string value(command_line.GetSwitchValueASCII( | 271 std::string value(command_line.GetSwitchValueASCII( |
272 switches::kSyncNotificationHost)); | 272 switches::kSyncNotificationHost)); |
273 if (!value.empty()) { | 273 if (!value.empty()) { |
274 notifier_options_.xmpp_host_port.set_host(value); | 274 notifier_options_.xmpp_host_port.set_host(value); |
275 notifier_options_.xmpp_host_port.set_port(notifier::kDefaultXmppPort); | 275 notifier_options_.xmpp_host_port.set_port(notifier::kDefaultXmppPort); |
276 } | 276 } |
277 LOG(INFO) << "Using " << notifier_options_.xmpp_host_port.ToString() | 277 LOG(INFO) << "Using " << notifier_options_.xmpp_host_port.ToString() |
278 << " for test sync notification server."; | 278 << " for test sync notification server."; |
279 } | 279 } |
280 | 280 |
| 281 notifier_options_.use_chrome_async_socket = |
| 282 !command_line.HasSwitch(switches::kSyncDisableChromeAsyncSocket); |
| 283 if (notifier_options_.use_chrome_async_socket) { |
| 284 LOG(INFO) << "Using ChromeAsyncSocket"; |
| 285 } |
| 286 |
281 notifier_options_.try_ssltcp_first = | 287 notifier_options_.try_ssltcp_first = |
282 command_line.HasSwitch(switches::kSyncUseSslTcp); | 288 command_line.HasSwitch(switches::kSyncUseSslTcp); |
283 if (notifier_options_.try_ssltcp_first) { | 289 if (notifier_options_.try_ssltcp_first) { |
284 LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; | 290 LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; |
285 } | 291 } |
286 | 292 |
287 if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { | 293 if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { |
288 const std::string notification_method_str( | 294 const std::string notification_method_str( |
289 command_line.GetSwitchValueASCII(switches::kSyncNotificationMethod)); | 295 command_line.GetSwitchValueASCII(switches::kSyncNotificationMethod)); |
290 notifier_options_.notification_method = | 296 notifier_options_.notification_method = |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 // is initialized, all enabled data types are consistent with one | 976 // is initialized, all enabled data types are consistent with one |
971 // another, and no unrecoverable error has transpired. | 977 // another, and no unrecoverable error has transpired. |
972 if (unrecoverable_error_detected_) | 978 if (unrecoverable_error_detected_) |
973 return false; | 979 return false; |
974 | 980 |
975 if (!data_type_manager_.get()) | 981 if (!data_type_manager_.get()) |
976 return false; | 982 return false; |
977 | 983 |
978 return data_type_manager_->state() == DataTypeManager::CONFIGURED; | 984 return data_type_manager_->state() == DataTypeManager::CONFIGURED; |
979 } | 985 } |
OLD | NEW |