| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/integration/sync_test.h" | 5 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 void SyncTest::AddTestSwitches(CommandLine* cl) { | 208 void SyncTest::AddTestSwitches(CommandLine* cl) { |
| 209 // TODO(rsimha): Until we implement a fake Tango server against which tests | 209 // TODO(rsimha): Until we implement a fake Tango server against which tests |
| 210 // can run, we need to set the --sync-notification-method to "p2p". | 210 // can run, we need to set the --sync-notification-method to "p2p". |
| 211 if (!cl->HasSwitch(switches::kSyncNotificationMethod)) | 211 if (!cl->HasSwitch(switches::kSyncNotificationMethod)) |
| 212 cl->AppendSwitchASCII(switches::kSyncNotificationMethod, "p2p"); | 212 cl->AppendSwitchASCII(switches::kSyncNotificationMethod, "p2p"); |
| 213 | 213 |
| 214 // Disable non-essential access of external network resources. | 214 // Disable non-essential access of external network resources. |
| 215 if (!cl->HasSwitch(switches::kDisableBackgroundNetworking)) | 215 if (!cl->HasSwitch(switches::kDisableBackgroundNetworking)) |
| 216 cl->AppendSwitch(switches::kDisableBackgroundNetworking); | 216 cl->AppendSwitch(switches::kDisableBackgroundNetworking); |
| 217 | |
| 218 if (!cl->HasSwitch(switches::kEnableSyncSearchEngines)) | |
| 219 cl->AppendSwitch(switches::kEnableSyncSearchEngines); | |
| 220 } | 217 } |
| 221 | 218 |
| 222 void SyncTest::AddOptionalTypesToCommandLine(CommandLine* cl) { | 219 void SyncTest::AddOptionalTypesToCommandLine(CommandLine* cl) { |
| 223 // TODO(sync): Remove this once sessions sync is enabled by default. | 220 // TODO(sync): Remove this once sessions sync is enabled by default. |
| 224 if (!cl->HasSwitch(switches::kEnableSyncTabs)) | 221 if (!cl->HasSwitch(switches::kEnableSyncTabs)) |
| 225 cl->AppendSwitch(switches::kEnableSyncTabs); | 222 cl->AppendSwitch(switches::kEnableSyncTabs); |
| 226 } | 223 } |
| 227 | 224 |
| 228 // static | 225 // static |
| 229 Profile* SyncTest::MakeProfile(const FilePath::StringType name) { | 226 Profile* SyncTest::MakeProfile(const FilePath::StringType name) { |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 | 785 |
| 789 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 786 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
| 790 const net::ProxyConfig& proxy_config) { | 787 const net::ProxyConfig& proxy_config) { |
| 791 base::WaitableEvent done(false, false); | 788 base::WaitableEvent done(false, false); |
| 792 BrowserThread::PostTask( | 789 BrowserThread::PostTask( |
| 793 BrowserThread::IO, FROM_HERE, | 790 BrowserThread::IO, FROM_HERE, |
| 794 base::Bind(&SetProxyConfigCallback, &done, | 791 base::Bind(&SetProxyConfigCallback, &done, |
| 795 make_scoped_refptr(context_getter), proxy_config)); | 792 make_scoped_refptr(context_getter), proxy_config)); |
| 796 done.Wait(); | 793 done.Wait(); |
| 797 } | 794 } |
| OLD | NEW |