diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 03:27:19 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 03:27:19 +0000 |
commit | 23ca8ddccca74556f3e56404c2bd7c53b9df16dd (patch) | |
tree | 1c63dbc7e08c96342500f9a5603ab7ca51ddbe63 /chrome/browser/sync | |
parent | f698a7f22b36d056bbbfa74aaf910d8ac3b97c23 (diff) | |
download | chromium_src-23ca8ddccca74556f3e56404c2bd7c53b9df16dd.zip chromium_src-23ca8ddccca74556f3e56404c2bd7c53b9df16dd.tar.gz chromium_src-23ca8ddccca74556f3e56404c2bd7c53b9df16dd.tar.bz2 |
[Sync] Added some switches for testing/debugging.
Added back in --sync-invalidate-xmpp-login (now, not only in debug mode!).
Added --sync-allow-insecure-xmpp-connection, which enables sync to
connect to insecure XMPP servers (e.g., a local one).
Removed obsolete --use-ssl-tcp switch.
BUG=None
TEST=Manual
Review URL: http://codereview.chromium.org/3766004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 9 | ||||
-rw-r--r-- | chrome/browser/sync/profile_sync_service.cc | 17 | ||||
-rw-r--r-- | chrome/browser/sync/tools/sync_listen_notifications.cc | 4 |
3 files changed, 20 insertions, 10 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 67bccec..0c8b706 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -1497,11 +1497,16 @@ void SyncManager::SyncInternal::InitializeTalkMediator() { new sync_notifier::ServerNotifierThread( notifier_options_, state, this); talk_mediator_.reset( - new TalkMediatorImpl(server_notifier_thread, false)); + new TalkMediatorImpl(server_notifier_thread, + notifier_options_.invalidate_xmpp_login, + notifier_options_.allow_insecure_connection)); } else { notifier::MediatorThread* mediator_thread = new notifier::MediatorThreadImpl(notifier_options_); - talk_mediator_.reset(new TalkMediatorImpl(mediator_thread, false)); + talk_mediator_.reset( + new TalkMediatorImpl(mediator_thread, + notifier_options_.invalidate_xmpp_login, + notifier_options_.allow_insecure_connection)); if (notifier_options_.notification_method != notifier::NOTIFICATION_LEGACY) { if (notifier_options_.notification_method == diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index ddaff62..768f950 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -274,14 +274,19 @@ void ProfileSyncService::InitSettings() { notifier_options_.xmpp_host_port.set_host(value); notifier_options_.xmpp_host_port.set_port(notifier::kDefaultXmppPort); } - LOG(INFO) << "Using " << notifier_options_.xmpp_host_port.ToString() + VLOG(1) << "Using " << notifier_options_.xmpp_host_port.ToString() << " for test sync notification server."; } - notifier_options_.try_ssltcp_first = - command_line.HasSwitch(switches::kSyncUseSslTcp); - if (notifier_options_.try_ssltcp_first) { - LOG(INFO) << "Trying SSL/TCP port before XMPP port for notifications."; + notifier_options_.invalidate_xmpp_login = + command_line.HasSwitch(switches::kSyncInvalidateXmppLogin); + if (notifier_options_.invalidate_xmpp_login) { + VLOG(1) << "Invalidating sync XMPP login."; + } + notifier_options_.allow_insecure_connection = + command_line.HasSwitch(switches::kSyncAllowInsecureXmppConnection); + if (notifier_options_.allow_insecure_connection) { + VLOG(1) << "Allowing insecure XMPP connections."; } if (command_line.HasSwitch(switches::kSyncNotificationMethod)) { @@ -388,7 +393,7 @@ void ProfileSyncService::CreateBackend() { void ProfileSyncService::StartUp() { // Don't start up multiple times. if (backend_.get()) { - LOG(INFO) << "Skipping bringing up backend host."; + VLOG(1) << "Skipping bringing up backend host."; return; } diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc index c619e14..8fc498b 100644 --- a/chrome/browser/sync/tools/sync_listen_notifications.cc +++ b/chrome/browser/sync/tools/sync_listen_notifications.cc @@ -240,9 +240,9 @@ int main(int argc, char* argv[]) { } bool allow_plain = command_line.HasSwitch(switches::kSyncAllowPlain); bool disable_tls = command_line.HasSwitch(switches::kSyncDisableTls); - bool use_ssl_tcp = command_line.HasSwitch(switches::kSyncUseSslTcp); + bool use_ssl_tcp = command_line.HasSwitch("use-ssl-tcp"); if (use_ssl_tcp && (port != 443)) { - LOG(WARNING) << switches::kSyncUseSslTcp << " is set but port is " << port + LOG(WARNING) << "--use-ssl-tcp is set but port is " << port << " instead of 443"; } std::string cache_invalidation_state; |