| 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 "chrome/browser/ui/views/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 void ShowSigninView() { | 189 void ShowSigninView() { |
| 190 DCHECK(current_profile_bubble()); | 190 DCHECK(current_profile_bubble()); |
| 191 DCHECK(current_profile_bubble()->avatar_menu_); | 191 DCHECK(current_profile_bubble()->avatar_menu_); |
| 192 current_profile_bubble()->ShowView( | 192 current_profile_bubble()->ShowView( |
| 193 profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN, | 193 profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN, |
| 194 current_profile_bubble()->avatar_menu_.get()); | 194 current_profile_bubble()->avatar_menu_.get()); |
| 195 base::MessageLoop::current()->RunUntilIdle(); | 195 base::MessageLoop::current()->RunUntilIdle(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 private: | 198 private: |
| 199 scoped_ptr<content::WindowedNotificationObserver> window_close_observer_; | 199 std::unique_ptr<content::WindowedNotificationObserver> window_close_observer_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(ProfileChooserViewExtensionsTest); | 201 DISALLOW_COPY_AND_ASSIGN(ProfileChooserViewExtensionsTest); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, | 204 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, |
| 205 NoProfileChooserOnOutsideUserDataDirProfiles) { | 205 NoProfileChooserOnOutsideUserDataDirProfiles) { |
| 206 // Test that the profile chooser view does not show when avatar menu is not | 206 // Test that the profile chooser view does not show when avatar menu is not |
| 207 // available. This can be repro'ed with a profile path outside user_data_dir. | 207 // available. This can be repro'ed with a profile path outside user_data_dir. |
| 208 // crbug.com/527505 | 208 // crbug.com/527505 |
| 209 Profile* new_profile = CreateProfileOutsideUserDataDir(); | 209 Profile* new_profile = CreateProfileOutsideUserDataDir(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // Wait until the user manager is shown. | 333 // Wait until the user manager is shown. |
| 334 runner->Run(); | 334 runner->Run(); |
| 335 | 335 |
| 336 // Assert that the first profile's extensions are not blocked. | 336 // Assert that the first profile's extensions are not blocked. |
| 337 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); | 337 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); |
| 338 ASSERT_EQ(0U, registry->blocked_extensions().size()); | 338 ASSERT_EQ(0U, registry->blocked_extensions().size()); |
| 339 | 339 |
| 340 // We need to hide the User Manager or else the process can't die. | 340 // We need to hide the User Manager or else the process can't die. |
| 341 UserManager::Hide(); | 341 UserManager::Hide(); |
| 342 } | 342 } |
| OLD | NEW |