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

Issue 2817643002: Make CloudPolicyValidator memory management clearer (Closed)

Created:
3 years, 8 months ago by emaxx
Modified:
3 years, 8 months ago
Reviewers:
Thiemo Nagel
CC:
chromium-reviews, oshima+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CloudPolicyValidator memory management clearer 1. Create() becomes returning a unique_ptr instead of a raw pointer. 2. StartValidation() becomes accepting the validator as a unique_ptr argument instead of taking ownership over "this". This should prevent from making bugs leading to memory leaks or double freeing, which were hard to notice with the old interface. 3. Minor cleanup related to C++11 features. No change of behavior is expected to be introduced. BUG=710679 TEST=existing tests Review-Url: https://codereview.chromium.org/2817643002 Cr-Commit-Position: refs/heads/master@{#465579} Committed: https://chromium.googlesource.com/chromium/src/+/18f3a62dabe898a03ad69569feb0ce37c53fc001

Patch Set 1 #

Patch Set 2 : Cleaner memory management in CloudPolicyValidator #

Total comments: 4

Messages

Total messages: 20 (14 generated)
emaxx
Thiemo, PTAL.
3 years, 8 months ago (2017-04-12 02:26:27 UTC) #10
Thiemo Nagel
Thank you for this CL! Definitely helps the readability of the code. LGTM % nits. ...
3 years, 8 months ago (2017-04-19 12:21:44 UTC) #13
emaxx
On 2017/04/19 12:21:44, Thiemo Nagel wrote: > Thank you for this CL! Definitely helps the ...
3 years, 8 months ago (2017-04-19 12:42:49 UTC) #14
Thiemo Nagel
Thanks for the explanation! Lgtm.
3 years, 8 months ago (2017-04-19 12:45:04 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2817643002/20001
3 years, 8 months ago (2017-04-19 12:46:05 UTC) #17
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 13:37:21 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/18f3a62dabe898a03ad69569feb0...

Powered by Google App Engine
This is Rietveld 408576698