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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_regular.cc

Issue 2921803002: [EasyUnlock] Force a device sync after turning off the feature. (Closed)
Patch Set: Created 3 years, 6 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/signin/easy_unlock_service_regular.h" 5 #include "chrome/browser/signin/easy_unlock_service_regular.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 void EasyUnlockServiceRegular::SetTurnOffFlowStatus(TurnOffFlowStatus status) { 582 void EasyUnlockServiceRegular::SetTurnOffFlowStatus(TurnOffFlowStatus status) {
583 turn_off_flow_status_ = status; 583 turn_off_flow_status_ = status;
584 NotifyTurnOffOperationStatusChanged(); 584 NotifyTurnOffOperationStatusChanged();
585 } 585 }
586 586
587 void EasyUnlockServiceRegular::OnToggleEasyUnlockApiComplete( 587 void EasyUnlockServiceRegular::OnToggleEasyUnlockApiComplete(
588 const cryptauth::ToggleEasyUnlockResponse& response) { 588 const cryptauth::ToggleEasyUnlockResponse& response) {
589 cryptauth_client_.reset(); 589 cryptauth_client_.reset();
590 590
591 GetCryptAuthDeviceManager()->ForceSyncNow(
592 cryptauth::InvocationReason::INVOCATION_REASON_FEATURE_TOGGLED);
593 EasyUnlockService::ResetLocalStateForUser(GetAccountId());
591 SetRemoteDevices(base::ListValue()); 594 SetRemoteDevices(base::ListValue());
592 SetTurnOffFlowStatus(IDLE); 595 SetTurnOffFlowStatus(IDLE);
593 ReloadAppAndLockScreen(); 596 ReloadAppAndLockScreen();
594 } 597 }
595 598
596 void EasyUnlockServiceRegular::OnToggleEasyUnlockApiFailed( 599 void EasyUnlockServiceRegular::OnToggleEasyUnlockApiFailed(
597 const std::string& error_message) { 600 const std::string& error_message) {
598 LOG(WARNING) << "Failed to turn off Smart Lock: " << error_message; 601 LOG(WARNING) << "Failed to turn off Smart Lock: " << error_message;
599 SetTurnOffFlowStatus(FAIL); 602 SetTurnOffFlowStatus(FAIL);
600 } 603 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 635
633 cryptauth::CryptAuthDeviceManager* 636 cryptauth::CryptAuthDeviceManager*
634 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { 637 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() {
635 cryptauth::CryptAuthDeviceManager* manager = 638 cryptauth::CryptAuthDeviceManager* manager =
636 ChromeCryptAuthServiceFactory::GetInstance() 639 ChromeCryptAuthServiceFactory::GetInstance()
637 ->GetForBrowserContext(profile()) 640 ->GetForBrowserContext(profile())
638 ->GetCryptAuthDeviceManager(); 641 ->GetCryptAuthDeviceManager();
639 DCHECK(manager); 642 DCHECK(manager);
640 return manager; 643 return manager;
641 } 644 }
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