summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 20:36:30 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 20:36:30 +0000
commit49554f0311d696155188b34e890ef2dca0a07414 (patch)
tree9fb3796c58f6d6a256a3639b7118a91ef2f968c8 /chrome
parente18a19b149d4a88701a45873307e03d866a01565 (diff)
downloadchromium_src-49554f0311d696155188b34e890ef2dca0a07414.zip
chromium_src-49554f0311d696155188b34e890ef2dca0a07414.tar.gz
chromium_src-49554f0311d696155188b34e890ef2dca0a07414.tar.bz2
Revert 62699 - [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. Reason for revert: Broke sync_integration_tests. BUG=None TEST=Manual Review URL: http://codereview.chromium.org/3766004 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/3906001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/sync/engine/syncapi.cc9
-rw-r--r--chrome/browser/sync/profile_sync_service.cc17
-rw-r--r--chrome/browser/sync/tools/sync_listen_notifications.cc4
-rw-r--r--chrome/common/chrome_switches.cc10
-rw-r--r--chrome/common/chrome_switches.h3
-rw-r--r--chrome/service/cloud_print/cloud_print_proxy_backend.cc4
-rw-r--r--chrome/test/live_sync/live_sync_test.cc11
7 files changed, 26 insertions, 32 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index f9e9059..a712291 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -1509,16 +1509,11 @@ void SyncManager::SyncInternal::InitializeTalkMediator() {
new sync_notifier::ServerNotifierThread(
notifier_options_, state, this);
talk_mediator_.reset(
- new TalkMediatorImpl(server_notifier_thread,
- notifier_options_.invalidate_xmpp_login,
- notifier_options_.allow_insecure_connection));
+ new TalkMediatorImpl(server_notifier_thread, false));
} else {
notifier::MediatorThread* mediator_thread =
new notifier::MediatorThreadImpl(notifier_options_);
- talk_mediator_.reset(
- new TalkMediatorImpl(mediator_thread,
- notifier_options_.invalidate_xmpp_login,
- notifier_options_.allow_insecure_connection));
+ talk_mediator_.reset(new TalkMediatorImpl(mediator_thread, false));
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 c9b2b58..5b92998 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -275,19 +275,14 @@ void ProfileSyncService::InitSettings() {
notifier_options_.xmpp_host_port.set_host(value);
notifier_options_.xmpp_host_port.set_port(notifier::kDefaultXmppPort);
}
- VLOG(1) << "Using " << notifier_options_.xmpp_host_port.ToString()
+ LOG(INFO) << "Using " << notifier_options_.xmpp_host_port.ToString()
<< " for test sync notification server.";
}
- 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.";
+ 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.";
}
if (command_line.HasSwitch(switches::kSyncNotificationMethod)) {
@@ -394,7 +389,7 @@ void ProfileSyncService::CreateBackend() {
void ProfileSyncService::StartUp() {
// Don't start up multiple times.
if (backend_.get()) {
- VLOG(1) << "Skipping bringing up backend host.";
+ LOG(INFO) << "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 8fc498b..c619e14 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("use-ssl-tcp");
+ bool use_ssl_tcp = command_line.HasSwitch(switches::kSyncUseSslTcp);
if (use_ssl_tcp && (port != 443)) {
- LOG(WARNING) << "--use-ssl-tcp is set but port is " << port
+ LOG(WARNING) << switches::kSyncUseSslTcp << " is set but port is " << port
<< " instead of 443";
}
std::string cache_invalidation_state;
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index daaf549..4d1dd44 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -975,10 +975,6 @@ const char kSingleProcess[] = "single-process";
// Start the browser maximized, regardless of any previous settings.
const char kStartMaximized[] = "start-maximized";
-// Allow insecure XMPP connections for sync (for testing).
-const char kSyncAllowInsecureXmppConnection[] =
- "sync-allow-insecure-xmpp-connection";
-
// Control Sync XMPP client settings.
const char kSyncAllowPlain[] = "allow-plain";
@@ -988,9 +984,6 @@ const char kSyncDisableTls[] = "disable-tls";
// Email used for sync.
const char kSyncEmail[] = "email";
-// Invalidate any login info passed into sync's XMPP connection.
-const char kSyncInvalidateXmppLogin[] = "sync-invalidate-xmpp-login";
-
// Use the SyncerThread implementation that matches up with the old pthread
// impl semantics, but using Chrome synchronization primitives. The only
// difference between this and the default is that we now have no timeout on
@@ -1016,6 +1009,9 @@ const char kSyncServer[] = "server";
const char kSyncServiceURL[] = "sync-url";
// Control Sync XMPP client settings.
+const char kSyncUseSslTcp[] = "use-ssl-tcp";
+
+// Control Sync XMPP client settings.
const char kSyncUseCacheInvalidation[] = "use-cache-invalidation";
// Pass the name of the current running automated test to Chrome.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 793a37f..6b52cc3 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -273,11 +273,9 @@ extern const char kSilentDumpOnDCHECK[];
extern const char kSimpleDataSource[];
extern const char kSingleProcess[];
extern const char kStartMaximized[];
-extern const char kSyncAllowInsecureXmppConnection[];
extern const char kSyncAllowPlain[];
extern const char kSyncDisableTls[];
extern const char kSyncEmail[];
-extern const char kSyncInvalidateXmppLogin[];
extern const char kSyncerThreadTimedStop[];
extern const char kSyncNotificationMethod[];
extern const char kSyncNotificationHost[];
@@ -285,6 +283,7 @@ extern const char kSyncPassword[];
extern const char kSyncPort[];
extern const char kSyncServer[];
extern const char kSyncServiceURL[];
+extern const char kSyncUseSslTcp[];
extern const char kSyncUseCacheInvalidation[];
extern const char kTestNaClSandbox[];
extern const char kTestName[];
diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.cc b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
index 33c1a55..2d0a46f 100644
--- a/chrome/service/cloud_print/cloud_print_proxy_backend.cc
+++ b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
@@ -321,12 +321,10 @@ void CloudPrintProxyBackend::Core::DoInitializeWithToken(
const notifier::NotifierOptions kNotifierOptions;
const bool kInvalidateXmppAuthToken = false;
- const bool kAllowInsecureXmppConnection = false;
talk_mediator_.reset(new notifier::TalkMediatorImpl(
new notifier::PushNotificationsThread(kNotifierOptions,
kCloudPrintPushNotificationsSource),
- kInvalidateXmppAuthToken,
- kAllowInsecureXmppConnection));
+ kInvalidateXmppAuthToken));
push_notifications_channel_ = kCloudPrintPushNotificationsSource;
push_notifications_channel_.append("/proxy/");
push_notifications_channel_.append(proxy_id);
diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
index 44b0d7b..6fd16cb 100644
--- a/chrome/test/live_sync/live_sync_test.cc
+++ b/chrome/test/live_sync/live_sync_test.cc
@@ -107,6 +107,17 @@ void LiveSyncTest::SetUp() {
if (!cl->HasSwitch(switches::kSyncNotificationMethod))
cl->AppendSwitchASCII(switches::kSyncNotificationMethod, "transitional");
+ // TODO(akalin): Delete this block of code once a local python notification
+ // server is implemented.
+ // The chrome sync builders are behind a firewall that blocks port 5222, the
+ // default port for XMPP notifications. This causes the tests to spend up to a
+ // minute waiting for a connection on port 5222 before they fail over to port
+ // 443, the default SSL/TCP port. This switch causes the tests to use port 443
+ // by default, without having to try port 5222.
+ if (!cl->HasSwitch(switches::kSyncUseSslTcp)) {
+ cl->AppendSwitch(switches::kSyncUseSslTcp);
+ }
+
// TODO(sync): Remove this once passwords sync is enabled by default.
if (!cl->HasSwitch(switches::kEnableSyncPasswords)) {
cl->AppendSwitch(switches::kEnableSyncPasswords);