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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 NULL, | 38 NULL, |
39 profile, | 39 profile, |
40 NULL, | 40 NULL, |
41 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 41 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
42 browser_sync::MANUAL_START), | 42 browser_sync::MANUAL_START), |
43 sync_initialized_(true), | 43 sync_initialized_(true), |
44 initialized_state_violation_(false) {} | 44 initialized_state_violation_(false) {} |
45 | 45 |
46 virtual ~FakeProfileSyncService() {} | 46 virtual ~FakeProfileSyncService() {} |
47 | 47 |
48 static BrowserContextKeyedService* BuildFakeProfileSyncService( | 48 static KeyedService* BuildFakeProfileSyncService( |
49 content::BrowserContext* context) { | 49 content::BrowserContext* context) { |
50 return new FakeProfileSyncService(static_cast<Profile*>(context)); | 50 return new FakeProfileSyncService(static_cast<Profile*>(context)); |
51 } | 51 } |
52 | 52 |
53 void set_sync_initialized(bool sync_initialized) { | 53 void set_sync_initialized(bool sync_initialized) { |
54 sync_initialized_ = sync_initialized; | 54 sync_initialized_ = sync_initialized; |
55 } | 55 } |
56 | 56 |
57 bool initialized_state_violation() { return initialized_state_violation_; } | 57 bool initialized_state_violation() { return initialized_state_violation_; } |
58 | 58 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 // Verifies that we wait for the sync service to be ready before checking | 178 // Verifies that we wait for the sync service to be ready before checking |
179 // encryption status. | 179 // encryption status. |
180 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, | 180 IN_PROC_BROWSER_TEST_F(PreferencesPrivateApiTest, |
181 GetSyncCategoriesWithoutPassphraseAsynchronous) { | 181 GetSyncCategoriesWithoutPassphraseAsynchronous) { |
182 service_->set_sync_initialized(false); | 182 service_->set_sync_initialized(false); |
183 TestGetSyncCategoriesWithoutPassphraseFunction(); | 183 TestGetSyncCategoriesWithoutPassphraseFunction(); |
184 } | 184 } |
185 | 185 |
186 } // namespace | 186 } // namespace |
OLD | NEW |