Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 271533004: Turning on MultiProfile by default for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "net/url_request/url_fetcher_delegate.h" 68 #include "net/url_request/url_fetcher_delegate.h"
69 #include "net/url_request/url_request_context.h" 69 #include "net/url_request/url_request_context.h"
70 #include "net/url_request/url_request_context_getter.h" 70 #include "net/url_request/url_request_context_getter.h"
71 #include "sync/engine/sync_scheduler_impl.h" 71 #include "sync/engine/sync_scheduler_impl.h"
72 #include "sync/notifier/p2p_invalidator.h" 72 #include "sync/notifier/p2p_invalidator.h"
73 #include "sync/protocol/sync.pb.h" 73 #include "sync/protocol/sync.pb.h"
74 #include "sync/test/fake_server/fake_server.h" 74 #include "sync/test/fake_server/fake_server.h"
75 #include "sync/test/fake_server/fake_server_network_resources.h" 75 #include "sync/test/fake_server/fake_server_network_resources.h"
76 #include "url/gurl.h" 76 #include "url/gurl.h"
77 77
78 #if defined(OS_CHROMEOS)
79 #include "chromeos/chromeos_switches.h"
80 #endif
81
78 using content::BrowserThread; 82 using content::BrowserThread;
79 using invalidation::InvalidationServiceFactory; 83 using invalidation::InvalidationServiceFactory;
80 84
81 namespace switches { 85 namespace switches {
82 const char kPasswordFileForTest[] = "password-file-for-test"; 86 const char kPasswordFileForTest[] = "password-file-for-test";
83 const char kSyncUserForTest[] = "sync-user-for-test"; 87 const char kSyncUserForTest[] = "sync-user-for-test";
84 const char kSyncPasswordForTest[] = "sync-password-for-test"; 88 const char kSyncPasswordForTest[] = "sync-password-for-test";
85 const char kSyncServerCommandLine[] = "sync-server-command-line"; 89 const char kSyncServerCommandLine[] = "sync-server-command-line";
86 } 90 }
87 91
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 239
236 // Stop the local sync test server. This is a no-op if one wasn't started. 240 // Stop the local sync test server. This is a no-op if one wasn't started.
237 TearDownLocalTestServer(); 241 TearDownLocalTestServer();
238 242
239 fake_server_.reset(); 243 fake_server_.reset();
240 } 244 }
241 245
242 void SyncTest::SetUpCommandLine(base::CommandLine* cl) { 246 void SyncTest::SetUpCommandLine(base::CommandLine* cl) {
243 AddTestSwitches(cl); 247 AddTestSwitches(cl);
244 AddOptionalTypesToCommandLine(cl); 248 AddOptionalTypesToCommandLine(cl);
249
250 #if defined(OS_CHROMEOS)
251 cl->AppendSwitch(chromeos::switches::kIgnoreUserProfileMappingForTests);
252 #endif
245 } 253 }
246 254
247 void SyncTest::AddTestSwitches(base::CommandLine* cl) { 255 void SyncTest::AddTestSwitches(base::CommandLine* cl) {
248 // Disable non-essential access of external network resources. 256 // Disable non-essential access of external network resources.
249 if (!cl->HasSwitch(switches::kDisableBackgroundNetworking)) 257 if (!cl->HasSwitch(switches::kDisableBackgroundNetworking))
250 cl->AppendSwitch(switches::kDisableBackgroundNetworking); 258 cl->AppendSwitch(switches::kDisableBackgroundNetworking);
251 259
252 if (!cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) 260 if (!cl->HasSwitch(switches::kSyncShortInitialRetryOverride))
253 cl->AppendSwitch(switches::kSyncShortInitialRetryOverride); 261 cl->AppendSwitch(switches::kSyncShortInitialRetryOverride);
254 } 262 }
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 BrowserThread::PostTask( 1043 BrowserThread::PostTask(
1036 BrowserThread::IO, FROM_HERE, 1044 BrowserThread::IO, FROM_HERE,
1037 base::Bind(&SetProxyConfigCallback, &done, 1045 base::Bind(&SetProxyConfigCallback, &done,
1038 make_scoped_refptr(context_getter), proxy_config)); 1046 make_scoped_refptr(context_getter), proxy_config));
1039 done.Wait(); 1047 done.Wait();
1040 } 1048 }
1041 1049
1042 fake_server::FakeServer* SyncTest::GetFakeServer() const { 1050 fake_server::FakeServer* SyncTest::GetFakeServer() const {
1043 return fake_server_.get(); 1051 return fake_server_.get();
1044 } 1052 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698