| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 sync_driver::SyncPrefs sync_prefs(profile->GetPrefs()); | 135 sync_driver::SyncPrefs sync_prefs(profile->GetPrefs()); |
| 136 sync_prefs.SetKeepEverythingSynced(false); | 136 sync_prefs.SetKeepEverythingSynced(false); |
| 137 | 137 |
| 138 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 138 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 139 profile_manager->RegisterTestingProfile(profile, true, false); | 139 profile_manager->RegisterTestingProfile(profile, true, false); |
| 140 | 140 |
| 141 service_ = static_cast<FakeProfileSyncService*>( | 141 service_ = static_cast<FakeProfileSyncService*>( |
| 142 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 142 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 143 profile, &FakeProfileSyncService::BuildFakeProfileSyncService)); | 143 profile, &FakeProfileSyncService::BuildFakeProfileSyncService)); |
| 144 | 144 |
| 145 browser_ = new Browser(Browser::CreateParams( | 145 browser_ = new Browser( |
| 146 profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); | 146 Browser::CreateParams(profile, ui::HOST_DESKTOP_TYPE_NATIVE)); |
| 147 } | 147 } |
| 148 | 148 |
| 149 // Calls GetSyncCategoriesWithoutPassphraseFunction and verifies that the | 149 // Calls GetSyncCategoriesWithoutPassphraseFunction and verifies that the |
| 150 // results returned are the expected ones. | 150 // results returned are the expected ones. |
| 151 void TestGetSyncCategoriesWithoutPassphraseFunction(); | 151 void TestGetSyncCategoriesWithoutPassphraseFunction(); |
| 152 | 152 |
| 153 protected: | 153 protected: |
| 154 Browser* browser_; | 154 Browser* browser_; |
| 155 FakeProfileSyncService* service_; | 155 FakeProfileSyncService* service_; |
| 156 | 156 |
| (...skipping 34 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 |