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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 CHECK(tmp_profile_paths_[index]->CreateUniqueTempDir()); | 340 CHECK(tmp_profile_paths_[index]->CreateUniqueTempDir()); |
341 } else { | 341 } else { |
342 // Create new profiles in user data dir so that other profiles can know | 342 // Create new profiles in user data dir so that other profiles can know |
343 // about it. This is needed in tests such as supervised user cases which | 343 // about it. This is needed in tests such as supervised user cases which |
344 // assume browser->profile() as the custodian profile. | 344 // assume browser->profile() as the custodian profile. |
345 base::FilePath user_data_dir; | 345 base::FilePath user_data_dir; |
346 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 346 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
347 CHECK( | 347 CHECK( |
348 tmp_profile_paths_[index]->CreateUniqueTempDirUnderPath(user_data_dir)); | 348 tmp_profile_paths_[index]->CreateUniqueTempDirUnderPath(user_data_dir)); |
349 } | 349 } |
350 base::FilePath profile_path = tmp_profile_paths_[index]->path(); | 350 base::FilePath profile_path = tmp_profile_paths_[index]->GetPath(); |
351 if (UsingExternalServers()) { | 351 if (UsingExternalServers()) { |
352 // If running against an EXTERNAL_LIVE_SERVER, we signin profiles using real | 352 // If running against an EXTERNAL_LIVE_SERVER, we signin profiles using real |
353 // GAIA server. This requires creating profiles with no test hooks. | 353 // GAIA server. This requires creating profiles with no test hooks. |
354 InitializeProfile(index, MakeProfileForUISignin(profile_path)); | 354 InitializeProfile(index, MakeProfileForUISignin(profile_path)); |
355 } else { | 355 } else { |
356 // Without need of real GAIA authentication, we create new test profiles. | 356 // Without need of real GAIA authentication, we create new test profiles. |
357 // For test profiles, a custom delegate needs to be used to do the | 357 // For test profiles, a custom delegate needs to be used to do the |
358 // initialization work before the profile is registered. | 358 // initialization work before the profile is registered. |
359 profile_delegates_[index].reset(new SyncProfileDelegate(base::Bind( | 359 profile_delegates_[index].reset(new SyncProfileDelegate(base::Bind( |
360 &SyncTest::InitializeProfile, base::Unretained(this), index))); | 360 &SyncTest::InitializeProfile, base::Unretained(this), index))); |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 | 1131 |
1132 void SyncTest::TriggerSyncForModelTypes(int index, | 1132 void SyncTest::TriggerSyncForModelTypes(int index, |
1133 syncer::ModelTypeSet model_types) { | 1133 syncer::ModelTypeSet model_types) { |
1134 GetSyncService(index)->TriggerRefresh(model_types); | 1134 GetSyncService(index)->TriggerRefresh(model_types); |
1135 } | 1135 } |
1136 | 1136 |
1137 void SyncTest::SetPreexistingPreferencesFileContents( | 1137 void SyncTest::SetPreexistingPreferencesFileContents( |
1138 const std::string& contents) { | 1138 const std::string& contents) { |
1139 preexisting_preferences_file_contents_ = contents; | 1139 preexisting_preferences_file_contents_ = contents; |
1140 } | 1140 } |
OLD | NEW |