Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_display.cc

Issue 1012083002: Resolve new GAIA flow's infinite loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/chromeos/login/ui/webui_login_display.h" 5 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
6 6
7 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 7 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
8 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 8 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
9 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" 9 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h"
10 #include "chrome/browser/chromeos/login/signin_screen_controller.h" 10 #include "chrome/browser/chromeos/login/signin_screen_controller.h"
11 #include "chrome/browser/chromeos/login/startup_utils.h"
11 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 12 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
12 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 13 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
13 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 14 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
14 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" 15 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
15 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
17 #include "chrome/grit/chromium_strings.h" 18 #include "chrome/grit/chromium_strings.h"
18 #include "chrome/grit/generated_resources.h" 19 #include "chrome/grit/generated_resources.h"
19 #include "chromeos/login/user_names.h" 20 #include "chromeos/login/user_names.h"
20 #include "components/user_manager/user_manager.h" 21 #include "components/user_manager/user_manager.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 webui_handler_->OnPreferencesChanged(); 89 webui_handler_->OnPreferencesChanged();
89 } 90 }
90 91
91 void WebUILoginDisplay::SetUIEnabled(bool is_enabled) { 92 void WebUILoginDisplay::SetUIEnabled(bool is_enabled) {
92 // TODO(nkostylev): Cleanup this condition, 93 // TODO(nkostylev): Cleanup this condition,
93 // see http://crbug.com/157885 and http://crbug.com/158255. 94 // see http://crbug.com/157885 and http://crbug.com/158255.
94 // Allow this call only before user sign in or at lock screen. 95 // Allow this call only before user sign in or at lock screen.
95 // If this call is made after new user signs in but login screen is still 96 // If this call is made after new user signs in but login screen is still
96 // around that would trigger a sign in extension refresh. 97 // around that would trigger a sign in extension refresh.
97 if (is_enabled && (!user_manager::UserManager::Get()->IsUserLoggedIn() || 98 if (is_enabled && (!user_manager::UserManager::Get()->IsUserLoggedIn() ||
98 ScreenLocker::default_screen_locker())) { 99 ScreenLocker::default_screen_locker()) &&
100 !StartupUtils::IsWebviewSigninEnabled()) {
99 ClearAndEnablePassword(); 101 ClearAndEnablePassword();
100 } 102 }
101 103
102 if (chromeos::LoginDisplayHost* host = 104 if (chromeos::LoginDisplayHost* host =
103 chromeos::LoginDisplayHostImpl::default_host()) { 105 chromeos::LoginDisplayHostImpl::default_host()) {
104 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView()) 106 if (chromeos::WebUILoginView* login_view = host->GetWebUILoginView())
105 login_view->SetUIEnabled(is_enabled); 107 login_view->SetUIEnabled(is_enabled);
106 } 108 }
107 } 109 }
108 110
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 delegate_->Signout(); 326 delegate_->Signout();
325 } 327 }
326 328
327 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { 329 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) {
328 if (delegate_) 330 if (delegate_)
329 delegate_->ResetPublicSessionAutoLoginTimer(); 331 delegate_->ResetPublicSessionAutoLoginTimer();
330 } 332 }
331 333
332 334
333 } // namespace chromeos 335 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698