| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 new P2PSyncRefresher(GetProfile(i), clients_[i]->service()); | 630 new P2PSyncRefresher(GetProfile(i), clients_[i]->service()); |
| 631 } | 631 } |
| 632 | 632 |
| 633 // OneClickSigninSyncStarter observer is created with a real user sign in. | 633 // OneClickSigninSyncStarter observer is created with a real user sign in. |
| 634 // It is deleted on certain conditions which are not satisfied by our tests, | 634 // It is deleted on certain conditions which are not satisfied by our tests, |
| 635 // and this causes the SigninTracker observer to stay hanging at shutdown. | 635 // and this causes the SigninTracker observer to stay hanging at shutdown. |
| 636 // Calling LoginUIService::SyncConfirmationUIClosed forces the observer to | 636 // Calling LoginUIService::SyncConfirmationUIClosed forces the observer to |
| 637 // be removed. http://crbug.com/484388 | 637 // be removed. http://crbug.com/484388 |
| 638 for (int i = 0; i < num_clients_; ++i) { | 638 for (int i = 0; i < num_clients_; ++i) { |
| 639 LoginUIServiceFactory::GetForProfile(GetProfile(i))-> | 639 LoginUIServiceFactory::GetForProfile(GetProfile(i))-> |
| 640 SyncConfirmationUIClosed(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS); | 640 SyncConfirmationUIClosed(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS, |
| 641 false); |
| 641 } | 642 } |
| 642 } | 643 } |
| 643 | 644 |
| 644 return true; | 645 return true; |
| 645 } | 646 } |
| 646 | 647 |
| 647 void SyncTest::TearDownOnMainThread() { | 648 void SyncTest::TearDownOnMainThread() { |
| 648 for (size_t i = 0; i < clients_.size(); ++i) { | 649 for (size_t i = 0; i < clients_.size(); ++i) { |
| 649 clients_[i]->service()->RequestStop(ProfileSyncService::CLEAR_DATA); | 650 clients_[i]->service()->RequestStop(ProfileSyncService::CLEAR_DATA); |
| 650 } | 651 } |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 | 1118 |
| 1118 void SyncTest::TriggerSyncForModelTypes(int index, | 1119 void SyncTest::TriggerSyncForModelTypes(int index, |
| 1119 syncer::ModelTypeSet model_types) { | 1120 syncer::ModelTypeSet model_types) { |
| 1120 GetSyncService(index)->TriggerRefresh(model_types); | 1121 GetSyncService(index)->TriggerRefresh(model_types); |
| 1121 } | 1122 } |
| 1122 | 1123 |
| 1123 void SyncTest::SetPreexistingPreferencesFileContents( | 1124 void SyncTest::SetPreexistingPreferencesFileContents( |
| 1124 const std::string& contents) { | 1125 const std::string& contents) { |
| 1125 preexisting_preferences_file_contents_ = contents; | 1126 preexisting_preferences_file_contents_ = contents; |
| 1126 } | 1127 } |
| OLD | NEW |