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

Unified Diff: chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h

Issue 2727713003: Update FWMP in TPM (Closed)
Patch Set: Nit Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
diff --git a/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h b/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
index 5dfada546c763ff65cc1d1c2c95342c595885949..36f97697c91987bde5bbfcca29b5c78d67c29cd4 100644
--- a/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
+++ b/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
@@ -16,6 +16,10 @@
#include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
#include "chrome/browser/chromeos/settings/device_settings_service.h"
+namespace cryptohome {
+class BaseReply;
+} // namespace cryptohome
+
namespace chromeos {
// Drives the forced re-enrollment check (for historical reasons called
@@ -86,6 +90,24 @@ class AutoEnrollmentController {
// Sets |state_| and notifies |progress_callbacks_|.
void UpdateState(policy::AutoEnrollmentState state);
+ // Makes a D-Bus call to cryptohome to remove the firmware management
+ // parameters (FWMP) from TPM. Stops the |safeguard_timer_| and notifies the
+ // |progress_callbacks_| after update is done if the timer is still running.
+ // The notifications have to be sent only after the FWMP is cleared, because
+ // the user might try to switch to devmode. In this case, if block_devmode is
+ // in FWMP and the clear operation didn't finish, the switch would be denied.
+ // Also the safeguard timer has to be active until the FWMP is cleared to
+ // avoid the risk of blocked flow.
+ void StartRemoveFirmwareManagementParameters();
+
+ // Callback for RemoveFirmwareManagementParameters(). If an error is received
+ // here, it is logged only, without changing the flow after that, because
+ // the FWMP is used only for newer devices.
+ void OnFirmwareManagementParametersRemoved(
+ chromeos::DBusMethodCallStatus call_status,
+ bool result,
+ const cryptohome::BaseReply& reply);
+
// Handles timeout of the safeguard timer and stops waiting for a result.
void Timeout();
@@ -107,7 +129,10 @@ class AutoEnrollmentController {
// Whether the forced re-enrollment check has to be applied.
FRERequirement fre_requirement_ = REQUIRED;
- base::WeakPtrFactory<AutoEnrollmentController> client_start_weak_factory_;
+ // TODO(igorcov): Merge the two weak_ptr factories in one.
+ base::WeakPtrFactory<AutoEnrollmentController> client_start_weak_factory_{
+ this};
+ base::WeakPtrFactory<AutoEnrollmentController> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentController);
};

Powered by Google App Engine
This is Rietveld 408576698