OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
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 28 matching lines...) Expand all Loading... |
39 #endif | 39 #endif |
40 | 40 |
41 using extensions::PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction; | 41 using extensions::PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction; |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 class FakeProfileSyncService : public ProfileSyncService { | 45 class FakeProfileSyncService : public ProfileSyncService { |
46 public: | 46 public: |
47 explicit FakeProfileSyncService(Profile* profile) | 47 explicit FakeProfileSyncService(Profile* profile) |
48 : ProfileSyncService( | 48 : ProfileSyncService( |
49 scoped_ptr<ProfileSyncComponentsFactory>( | 49 scoped_ptr<sync_driver::SyncApiComponentFactory>( |
50 new ProfileSyncComponentsFactoryMock()), | 50 new ProfileSyncComponentsFactoryMock()), |
51 profile, | 51 profile, |
52 make_scoped_ptr<SupervisedUserSigninManagerWrapper>(NULL), | 52 make_scoped_ptr<SupervisedUserSigninManagerWrapper>(NULL), |
53 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 53 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
54 browser_sync::MANUAL_START), | 54 browser_sync::MANUAL_START), |
55 sync_initialized_(true), | 55 sync_initialized_(true), |
56 initialized_state_violation_(false) {} | 56 initialized_state_violation_(false) {} |
57 | 57 |
58 ~FakeProfileSyncService() override {} | 58 ~FakeProfileSyncService() override {} |
59 | 59 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 // Verifies that we wait for the sync service to be ready before checking | 192 // Verifies that we wait for the sync service to be ready before checking |
193 // encryption status. | 193 // encryption status. |
194 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, | 194 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, |
195 GetSyncCategoriesWithoutPassphraseAsynchronous) { | 195 GetSyncCategoriesWithoutPassphraseAsynchronous) { |
196 service_->set_sync_initialized(false); | 196 service_->set_sync_initialized(false); |
197 TestGetSyncCategoriesWithoutPassphraseFunction(); | 197 TestGetSyncCategoriesWithoutPassphraseFunction(); |
198 } | 198 } |
199 | 199 |
200 } // namespace | 200 } // namespace |
OLD | NEW |