| 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 | |
| 287 notifier_options_.try_ssltcp_first = | 281 notifier_options_.try_ssltcp_first = |
| 288 command_line.HasSwitch(switches::kSyncUseSslTcp); | 282 command_line.HasSwitch(switches::kSyncUseSslTcp); |
| 289 if (notifier_options_.try_ssltcp_first) { | 283 if (notifier_options_.try_ssltcp_first) { |
| 290 LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; | 284 LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; |
| 291 } | 285 } |
| 292 | 286 |
| 293 if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { | 287 if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { |
| 294 const std::string notification_method_str( | 288 const std::string notification_method_str( |
| 295 command_line.GetSwitchValueASCII(switches::kSyncNotificationMethod)); | 289 command_line.GetSwitchValueASCII(switches::kSyncNotificationMethod)); |
| 296 notifier_options_.notification_method = | 290 notifier_options_.notification_method = |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 // is initialized, all enabled data types are consistent with one | 970 // is initialized, all enabled data types are consistent with one |
| 977 // another, and no unrecoverable error has transpired. | 971 // another, and no unrecoverable error has transpired. |
| 978 if (unrecoverable_error_detected_) | 972 if (unrecoverable_error_detected_) |
| 979 return false; | 973 return false; |
| 980 | 974 |
| 981 if (!data_type_manager_.get()) | 975 if (!data_type_manager_.get()) |
| 982 return false; | 976 return false; |
| 983 | 977 |
| 984 return data_type_manager_->state() == DataTypeManager::CONFIGURED; | 978 return data_type_manager_->state() == DataTypeManager::CONFIGURED; |
| 985 } | 979 } |
| OLD | NEW |