Issue metadata
Sign in to add a comment
|
chrome elf registry functions should have a scoped key helper |
||||||||||||||||||||||
Issue descriptionIn https://codereview.chromium.org/2487783002/diff/40001/chrome/install_static/install_util.ccMark noted that it'd be nicer if the API wasn't so closely matched to the raw NT one. We could have a scoped object be returned to avoid forgetting to close things.
,
Nov 16 2016
Sorry, maybe I wasn't clear in the initial report. I'm just using it in chrome_elf, but it still seems a bit cumbersome to require Open/Create to be matched with a corresponding Close, rather than having a ScopedKey helper. Does that seem reasonable? I will prototype what I mean and you can see if you like it.
,
Nov 16 2016
Oh, did you mean the dependency on base because of using ScopedGeneric? I agree, we wouldn't want to do that. But nt_registry.h could have a simple class with a destructor that does the close. If just you meant simply that it's "bigger" and less raw with the scoper, I think I disagree. I suspect it'll be less code, and still pretty clear what's happening underneath. But we'd have to try it to be sure, I guess.
,
Nov 16 2016
Ah ok, feel free to prototype!
,
Nov 18 2016
,
Feb 23 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by penny...@chromium.org
, Nov 16 2016