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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_store.cc

Issue 2817643002: Make CloudPolicyValidator memory management clearer (Closed)
Patch Set: Cleaner memory management in CloudPolicyValidator Created 3 years, 8 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: components/policy/core/common/cloud/user_cloud_policy_store.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_store.cc b/components/policy/core/common/cloud/user_cloud_policy_store.cc
index 9307530d63bf6014d2647a4db46561446c4f8c90..47917bcacfa3ebed28844a1d7027dd63151500a7 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_store.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_store.cc
@@ -408,9 +408,8 @@ void UserCloudPolicyStore::Validate(
}
if (validate_in_background) {
- // Start validation in the background. The Validator will free itself once
- // validation is complete.
- validator.release()->StartValidation(callback);
+ // Start validation in the background.
+ UserCloudPolicyValidator::StartValidation(std::move(validator), callback);
} else {
// Run validation immediately and invoke the callback with the results.
validator->RunValidation();

Powered by Google App Engine
This is Rietveld 408576698