| 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 23 matching lines...) Expand all Loading... |
| 34 #include "content/public/test/test_browser_thread_bundle.h" | 34 #include "content/public/test/test_browser_thread_bundle.h" |
| 35 #include "content/public/test/test_utils.h" | 35 #include "content/public/test/test_utils.h" |
| 36 #include "extensions/browser/extension_prefs.h" | 36 #include "extensions/browser/extension_prefs.h" |
| 37 #include "extensions/common/extension.h" | 37 #include "extensions/common/extension.h" |
| 38 #include "extensions/common/manifest_constants.h" | 38 #include "extensions/common/manifest_constants.h" |
| 39 #include "extensions/common/permissions/permission_set.h" | 39 #include "extensions/common/permissions/permission_set.h" |
| 40 #include "testing/gmock/include/gmock/gmock.h" | 40 #include "testing/gmock/include/gmock/gmock.h" |
| 41 #include "testing/gtest/include/gtest/gtest.h" | 41 #include "testing/gtest/include/gtest/gtest.h" |
| 42 | 42 |
| 43 #if defined(OS_CHROMEOS) | 43 #if defined(OS_CHROMEOS) |
| 44 #include "chrome/browser/chromeos/login/user_manager.h" | 44 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 45 #include "chrome/browser/chromeos/settings/cros_settings.h" | 45 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 46 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 46 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 namespace { | 49 namespace { |
| 50 | 50 |
| 51 template<typename T> | 51 template<typename T> |
| 52 void GetValueAndQuit(T* result, const base::Closure& quit, T actual) { | 52 void GetValueAndQuit(T* result, const base::Closure& quit, T actual) { |
| 53 *result = actual; | 53 *result = actual; |
| 54 quit.Run(); | 54 quit.Run(); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { | 261 TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Restarted) { |
| 262 // Browser has been shut down since profile was created. | 262 // Browser has been shut down since profile was created. |
| 263 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); | 263 user_prefs_->set_read_error(PersistentPrefStore::PREF_READ_ERROR_NONE); |
| 264 EXPECT_TRUE( | 264 EXPECT_TRUE( |
| 265 GetCallbackResult( | 265 GetCallbackResult( |
| 266 base::Bind( | 266 base::Bind( |
| 267 &ui::CheckShouldPromptForNewProfile, | 267 &ui::CheckShouldPromptForNewProfile, |
| 268 profile_.get()))); | 268 profile_.get()))); |
| 269 } | 269 } |
| OLD | NEW |