OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/live_sync/live_sync_test.h" | 5 #include "chrome/browser/sync/test/live_sync/live_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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } | 217 } |
218 | 218 |
219 void LiveSyncTest::AddOptionalTypesToCommandLine(CommandLine* cl) { | 219 void LiveSyncTest::AddOptionalTypesToCommandLine(CommandLine* cl) { |
220 // TODO(sync): Remove this once sessions sync is enabled by default. | 220 // TODO(sync): Remove this once sessions sync is enabled by default. |
221 if (!cl->HasSwitch(switches::kEnableSyncSessions)) | 221 if (!cl->HasSwitch(switches::kEnableSyncTabs)) |
222 cl->AppendSwitch(switches::kEnableSyncSessions); | 222 cl->AppendSwitch(switches::kEnableSyncTabs); |
223 } | 223 } |
224 | 224 |
225 // static | 225 // static |
226 Profile* LiveSyncTest::MakeProfile(const FilePath::StringType name) { | 226 Profile* LiveSyncTest::MakeProfile(const FilePath::StringType name) { |
227 FilePath path; | 227 FilePath path; |
228 PathService::Get(chrome::DIR_USER_DATA, &path); | 228 PathService::Get(chrome::DIR_USER_DATA, &path); |
229 path = path.Append(name); | 229 path = path.Append(name); |
230 | 230 |
231 if (!file_util::PathExists(path)) | 231 if (!file_util::PathExists(path)) |
232 CHECK(file_util::CreateDirectory(path)); | 232 CHECK(file_util::CreateDirectory(path)); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 const net::ProxyConfig& proxy_config) { | 623 const net::ProxyConfig& proxy_config) { |
624 base::WaitableEvent done(false, false); | 624 base::WaitableEvent done(false, false); |
625 BrowserThread::PostTask( | 625 BrowserThread::PostTask( |
626 BrowserThread::IO, | 626 BrowserThread::IO, |
627 FROM_HERE, | 627 FROM_HERE, |
628 new SetProxyConfigTask(&done, | 628 new SetProxyConfigTask(&done, |
629 context_getter, | 629 context_getter, |
630 proxy_config)); | 630 proxy_config)); |
631 done.Wait(); | 631 done.Wait(); |
632 } | 632 } |
OLD | NEW |