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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 std::string value(command_line.GetSwitchValueASCII( | 213 std::string value(command_line.GetSwitchValueASCII( |
214 switches::kSyncNotificationHost)); | 214 switches::kSyncNotificationHost)); |
215 if (!value.empty()) { | 215 if (!value.empty()) { |
216 notifier_options_.xmpp_host_port.set_host(value); | 216 notifier_options_.xmpp_host_port.set_host(value); |
217 notifier_options_.xmpp_host_port.set_port(notifier::kDefaultXmppPort); | 217 notifier_options_.xmpp_host_port.set_port(notifier::kDefaultXmppPort); |
218 } | 218 } |
219 LOG(INFO) << "Using " << notifier_options_.xmpp_host_port.ToString() | 219 LOG(INFO) << "Using " << notifier_options_.xmpp_host_port.ToString() |
220 << " for test sync notification server."; | 220 << " for test sync notification server."; |
221 } | 221 } |
222 | 222 |
223 notifier_options_.use_chrome_async_socket = | |
224 !command_line.HasSwitch(switches::kSyncDisableChromeAsyncSocket); | |
225 if (notifier_options_.use_chrome_async_socket) { | |
226 LOG(INFO) << "Using ChromeAsyncSocket"; | |
227 } | |
228 | |
229 notifier_options_.try_ssltcp_first = | 223 notifier_options_.try_ssltcp_first = |
230 command_line.HasSwitch(switches::kSyncUseSslTcp); | 224 command_line.HasSwitch(switches::kSyncUseSslTcp); |
231 if (notifier_options_.try_ssltcp_first) { | 225 if (notifier_options_.try_ssltcp_first) { |
232 LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; | 226 LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; |
233 } | 227 } |
234 | 228 |
235 if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { | 229 if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { |
236 const std::string notification_method_str( | 230 const std::string notification_method_str( |
237 command_line.GetSwitchValueASCII(switches::kSyncNotificationMethod)); | 231 command_line.GetSwitchValueASCII(switches::kSyncNotificationMethod)); |
238 notifier_options_.notification_method = | 232 notifier_options_.notification_method = |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 // is initialized, all enabled data types are consistent with one | 873 // is initialized, all enabled data types are consistent with one |
880 // another, and no unrecoverable error has transpired. | 874 // another, and no unrecoverable error has transpired. |
881 if (unrecoverable_error_detected_) | 875 if (unrecoverable_error_detected_) |
882 return false; | 876 return false; |
883 | 877 |
884 if (!data_type_manager_.get()) | 878 if (!data_type_manager_.get()) |
885 return false; | 879 return false; |
886 | 880 |
887 return data_type_manager_->state() == DataTypeManager::CONFIGURED; | 881 return data_type_manager_->state() == DataTypeManager::CONFIGURED; |
888 } | 882 } |
OLD | NEW |