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

Side by Side Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 2886083003: Merge "cros: Hide banner on NeedsDircryptoMigration call failure" (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/screens/user_selection_screen.h" 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 weak_ptr_factory_.GetWeakPtr(), account_id)); 193 weak_ptr_factory_.GetWeakPtr(), account_id));
194 } 194 }
195 195
196 // Callback invoked when NeedsDircryptoMigration call is finished. 196 // Callback invoked when NeedsDircryptoMigration call is finished.
197 void OnCryptohomeNeedsDircryptoMigrationCallback( 197 void OnCryptohomeNeedsDircryptoMigrationCallback(
198 const AccountId& account_id, 198 const AccountId& account_id,
199 DBusMethodCallStatus call_status, 199 DBusMethodCallStatus call_status,
200 bool needs_migration) { 200 bool needs_migration) {
201 if (call_status != DBUS_METHOD_CALL_SUCCESS) { 201 if (call_status != DBUS_METHOD_CALL_SUCCESS) {
202 LOG(ERROR) << "Failed to call cryptohome NeedsDircryptoMigration."; 202 LOG(ERROR) << "Failed to call cryptohome NeedsDircryptoMigration.";
203 // Hide the banner to avoid confusion in http://crbug.com/721948.
204 // Cache is not updated so that cryptohome call will still be attempted.
205 UpdateUI(account_id, false);
203 return; 206 return;
204 } 207 }
205 208
206 needs_dircrypto_migration_cache_[account_id] = needs_migration; 209 needs_dircrypto_migration_cache_[account_id] = needs_migration;
207 UpdateUI(account_id, needs_migration); 210 UpdateUI(account_id, needs_migration);
208 } 211 }
209 212
210 // Update UI for the given user when the check result is available. 213 // Update UI for the given user when the check result is available.
211 void UpdateUI(const AccountId& account_id, bool needs_migration) { 214 void UpdateUI(const AccountId& account_id, bool needs_migration) {
212 // Bail if the user is not the currently focused. 215 // Bail if the user is not the currently focused.
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 // The user profile should exist if and only if this is the lock screen. 694 // The user profile should exist if and only if this is the lock screen.
692 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); 695 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN);
693 696
694 if (!profile) 697 if (!profile)
695 profile = profile_helper->GetSigninProfile(); 698 profile = profile_helper->GetSigninProfile();
696 699
697 return EasyUnlockService::Get(profile); 700 return EasyUnlockService::Get(profile);
698 } 701 }
699 702
700 } // namespace chromeos 703 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698