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

Issue 2697363003: [Extensions Bindings] Move request dispatch to APIRequestHandler (Closed)

Created:
3 years, 10 months ago by Devlin
Modified:
3 years, 10 months ago
Reviewers:
lazyboy, jbroman
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions Bindings] Move request dispatch to APIRequestHandler Move the logic to dispatch the request (via a curried-in callback) to APIRequestHandler instead of APIBinding. This has a few advantages: - Makes a bit more sense; the request handler should handle the requests. - Reduces a bit of logic in the very-busy APIBinding. - Will make subsequent CLs (dispatching requests from custom types) easier. The only reason the logic currently lives in APIBinding is because it predates the APIRequestHandler. BUG=653596 Review-Url: https://codereview.chromium.org/2697363003 Cr-Commit-Position: refs/heads/master@{#451403} Committed: https://chromium.googlesource.com/chromium/src/+/2f81ad2e573a460938c93cdb022b40034ac7fb5f

Patch Set 1 #

Patch Set 2 : . #

Total comments: 4

Messages

Total messages: 18 (9 generated)
Devlin
Just moving stuff around; no functionality changes.
3 years, 10 months ago (2017-02-17 16:49:40 UTC) #7
jbroman
lgtm
3 years, 10 months ago (2017-02-17 18:25:07 UTC) #8
lazyboy
lgtm https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api_request_handler.cc File extensions/renderer/api_request_handler.cc (right): https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api_request_handler.cc#newcode19 extensions/renderer/api_request_handler.cc:19: APIRequestHandler::Request::~Request() = default; Is there any particular reason ...
3 years, 10 months ago (2017-02-17 19:47:14 UTC) #9
Devlin
https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api_request_handler.cc File extensions/renderer/api_request_handler.cc (right): https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api_request_handler.cc#newcode19 extensions/renderer/api_request_handler.cc:19: APIRequestHandler::Request::~Request() = default; On 2017/02/17 19:47:13, lazyboy wrote: > ...
3 years, 10 months ago (2017-02-17 21:57:42 UTC) #10
Devlin
(asked lazyboy@ offline; landing this as-is for now, but will investigate more for a general ...
3 years, 10 months ago (2017-02-17 22:06:25 UTC) #11
lazyboy
https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api_request_handler.cc File extensions/renderer/api_request_handler.cc (right): https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api_request_handler.cc#newcode19 extensions/renderer/api_request_handler.cc:19: APIRequestHandler::Request::~Request() = default; On 2017/02/17 21:57:41, Devlin wrote: > ...
3 years, 10 months ago (2017-02-17 22:06:55 UTC) #13
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/2697363003/20001
3 years, 10 months ago (2017-02-17 22:08:10 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/2f81ad2e573a460938c93cdb022b40034ac7fb5f
3 years, 10 months ago (2017-02-17 23:50:15 UTC) #17
jbroman
3 years, 10 months ago (2017-02-21 00:55:55 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api...
File extensions/renderer/api_request_handler.cc (right):

https://codereview.chromium.org/2697363003/diff/20001/extensions/renderer/api...
extensions/renderer/api_request_handler.cc:19:
APIRequestHandler::Request::~Request() = default;
On 2017/02/17 at 22:06:55, lazyboy wrote:
> On 2017/02/17 21:57:41, Devlin wrote:
> > On 2017/02/17 19:47:13, lazyboy wrote:
> > > Is there any particular reason to choose "default" instead of {}?
> > 
> > Good question.  I've noticed a trend towards using default for destructors,
but
> > in looking through the style, I can't find any indication that one is
preferred
> > over the other (and both are allowed).  Do you have a preference in either
> > direction?
> 
> This is fine, I was just curious if this was was intentional for some reason
and I wanted to learn...
> lgtm
> > 
> > (Or Jeremy, do you know if there's a reason to use one over the other?)

I don't have a preference one way or another, and the style guide is silent
about it. "= default;" is more helpful for copy/move constructors and assignment
operators, but for destructors it's fine either way.

Powered by Google App Engine
This is Rietveld 408576698