| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/glue/sync_backend_host_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 base::Unretained(this))); | 253 base::Unretained(this))); |
| 254 base::RunLoop run_loop; | 254 base::RunLoop run_loop; |
| 255 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, | 255 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, |
| 256 run_loop.QuitClosure(), | 256 run_loop.QuitClosure(), |
| 257 TestTimeouts::action_timeout()); | 257 TestTimeouts::action_timeout()); |
| 258 run_loop.Run(); | 258 run_loop.Run(); |
| 259 return ready_types; | 259 return ready_types; |
| 260 } | 260 } |
| 261 | 261 |
| 262 void IssueRefreshRequest(syncer::ModelTypeSet types) { | 262 void IssueRefreshRequest(syncer::ModelTypeSet types) { |
| 263 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 263 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 264 | 264 |
| 265 content::NotificationService::current()->Notify( | 265 content::NotificationService::current()->Notify( |
| 266 chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, | 266 chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, |
| 267 content::Source<Profile>(profile_), | 267 content::Source<Profile>(profile_), |
| 268 content::Details<syncer::ModelTypeSet>(&types)); | 268 content::Details<syncer::ModelTypeSet>(&types)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 protected: | 271 protected: |
| 272 void DownloadReady(syncer::ModelTypeSet succeeded_types, | 272 void DownloadReady(syncer::ModelTypeSet succeeded_types, |
| 273 syncer::ModelTypeSet failed_types) { | 273 syncer::ModelTypeSet failed_types) { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 syncer::ModelTypeSet()); | 788 syncer::ModelTypeSet()); |
| 789 EXPECT_TRUE( | 789 EXPECT_TRUE( |
| 790 ready_types.Equals(syncer::Difference(enabled_types_, error_types))); | 790 ready_types.Equals(syncer::Difference(enabled_types_, error_types))); |
| 791 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( | 791 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( |
| 792 error_types).Empty()); | 792 error_types).Empty()); |
| 793 } | 793 } |
| 794 | 794 |
| 795 } // namespace | 795 } // namespace |
| 796 | 796 |
| 797 } // namespace browser_sync | 797 } // namespace browser_sync |
| OLD | NEW |