| 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/ui/sync/profile_signin_confirmation_helper.h" | 5 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 // Initialize the services we check. | 140 // Initialize the services we check. |
| 141 profile_->CreateBookmarkModel(true); | 141 profile_->CreateBookmarkModel(true); |
| 142 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); | 142 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); |
| 143 bookmarks::test::WaitForBookmarkModelToLoad(model_); | 143 bookmarks::test::WaitForBookmarkModelToLoad(model_); |
| 144 ASSERT_TRUE(profile_->CreateHistoryService(true, false)); | 144 ASSERT_TRUE(profile_->CreateHistoryService(true, false)); |
| 145 #if defined(ENABLE_EXTENSIONS) | 145 #if defined(ENABLE_EXTENSIONS) |
| 146 extensions::TestExtensionSystem* system = | 146 extensions::TestExtensionSystem* system = |
| 147 static_cast<extensions::TestExtensionSystem*>( | 147 static_cast<extensions::TestExtensionSystem*>( |
| 148 extensions::ExtensionSystem::Get(profile_.get())); | 148 extensions::ExtensionSystem::Get(profile_.get())); |
| 149 CommandLine command_line(CommandLine::NO_PROGRAM); | 149 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
| 150 system->CreateExtensionService(&command_line, | 150 system->CreateExtensionService(&command_line, |
| 151 base::FilePath(kExtensionFilePath), | 151 base::FilePath(kExtensionFilePath), |
| 152 false); | 152 false); |
| 153 #endif | 153 #endif |
| 154 } | 154 } |
| 155 | 155 |
| 156 void TearDown() override { | 156 void TearDown() override { |
| 157 // TestExtensionSystem uses DeleteSoon, so we need to delete the profile | 157 // TestExtensionSystem uses DeleteSoon, so we need to delete the profile |
| 158 // and then run the message queue to clean up. | 158 // and then run the message queue to clean up. |
| 159 profile_.reset(); | 159 profile_.reset(); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { | 272 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { |
| 273 // Browser has been shut down since profile was created. | 273 // Browser has been shut down since profile was created. |
| 274 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); | 274 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); |
| 275 EXPECT_TRUE( | 275 EXPECT_TRUE( |
| 276 GetCallbackResult( | 276 GetCallbackResult( |
| 277 base::Bind( | 277 base::Bind( |
| 278 &ui::CheckShouldPromptForNewProfile, | 278 &ui::CheckShouldPromptForNewProfile, |
| 279 profile_.get()))); | 279 profile_.get()))); |
| 280 } | 280 } |
| OLD | NEW |