|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by yhirano Modified:
4 years, 1 month ago CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, Randy Smith (Not in Mondays), yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, loading-reviews_chromium.org, darin (slow to review), mmenke Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests
We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As
we are planning to set an error_handler to the associated binding, we need to
pass a proper URLLoaderAssociatedRequest.
BUG=603396
Committed: https://crrev.com/ffcc0b4318abf391735e2eb2f46381a3264bd2c6
Cr-Commit-Position: refs/heads/master@{#431764}
Patch Set 1 #Patch Set 2 : done #
Total comments: 2
Patch Set 3 : fix #Patch Set 4 : fix #Patch Set 5 : fix #
Total comments: 4
Patch Set 6 : fix #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 38 (28 generated)
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests. We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set a error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ========== to ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests. We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ==========
Description was changed from ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests. We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ========== to ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
yhirano@chromium.org changed reviewers: + yzshen@chromium.org
Can you take a look? See also: https://codereview.chromium.org/2466843002/
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2489793002/diff/20001/content/browser/loader/... File content/browser/loader/mojo_async_resource_handler_unittest.cc (right): https://codereview.chromium.org/2489793002/diff/20001/content/browser/loader/... content/browser/loader/mojo_async_resource_handler_unittest.cc:355: scoped_refptr<TestURLLoaderFactory::Waiter> waiter( I think |waiter| may not be necessary, we could: - keep a pointer to the TestURLLoaderFactory instance, say, factory_impl. You could use the returned value of MakeStrongBinding(), or make a non-strong binding and manage the instance lifetime yourself. - after you call url_loader_factory_->CreateLoaderAndStart(), call url_loader_factory_.FlushForTesting(), that will make sure the previous call arrives at the other side. - let TestURLLoaderFactory::CreateLoaderAndStart() store the incoming request and ptr_info. - get the request and ptr from factory_impl.
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2489793002/diff/20001/content/browser/loader/... File content/browser/loader/mojo_async_resource_handler_unittest.cc (right): https://codereview.chromium.org/2489793002/diff/20001/content/browser/loader/... content/browser/loader/mojo_async_resource_handler_unittest.cc:355: scoped_refptr<TestURLLoaderFactory::Waiter> waiter( On 2016/11/09 17:40:48, yzshen1 wrote: > I think |waiter| may not be necessary, we could: > - keep a pointer to the TestURLLoaderFactory instance, say, factory_impl. You > could use the returned value of MakeStrongBinding(), or make a non-strong > binding and manage the instance lifetime yourself. > - after you call url_loader_factory_->CreateLoaderAndStart(), call > url_loader_factory_.FlushForTesting(), that will make sure the previous call > arrives at the other side. > - let TestURLLoaderFactory::CreateLoaderAndStart() store the incoming request > and ptr_info. > - get the request and ptr from factory_impl. Thanks, done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM with two more nits. https://codereview.chromium.org/2489793002/diff/80001/content/browser/loader/... File content/browser/loader/mojo_async_resource_handler_unittest.cc (right): https://codereview.chromium.org/2489793002/diff/80001/content/browser/loader/... content/browser/loader/mojo_async_resource_handler_unittest.cc:289: mojom::URLLoaderAssociatedRequest LoaderRequest() { style nit: Please consider either naming it PassLoaderRequest() or making it a getter: mojom::URLLoaderAssociatedRequest& loader_request() https://codereview.chromium.org/2489793002/diff/80001/content/browser/loader/... content/browser/loader/mojo_async_resource_handler_unittest.cc:308: base::WeakPtrFactory<TestURLLoaderFactory> weak_factory_; I think this is not needed. mojo::MakeStrongBinding() returns a base::WeakPtr<StrongBinding<Interface>> for you. You could use that instead.
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2489793002/diff/80001/content/browser/loader/... File content/browser/loader/mojo_async_resource_handler_unittest.cc (right): https://codereview.chromium.org/2489793002/diff/80001/content/browser/loader/... content/browser/loader/mojo_async_resource_handler_unittest.cc:289: mojom::URLLoaderAssociatedRequest LoaderRequest() { On 2016/11/10 17:28:36, yzshen1 wrote: > style nit: Please consider either naming it PassLoaderRequest() or making it a > getter: > mojom::URLLoaderAssociatedRequest& loader_request() Done. https://codereview.chromium.org/2489793002/diff/80001/content/browser/loader/... content/browser/loader/mojo_async_resource_handler_unittest.cc:308: base::WeakPtrFactory<TestURLLoaderFactory> weak_factory_; On 2016/11/10 17:28:36, yzshen1 wrote: > I think this is not needed. mojo::MakeStrongBinding() returns a > base::WeakPtr<StrongBinding<Interface>> for you. You could use that instead. Done.
yhirano@chromium.org changed reviewers: + csharrison@chromium.org
+csharrison@ for OWNER reivew.
generally lgtm
The CQ bit was checked by yhirano@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yzshen@chromium.org Link to the patchset: https://codereview.chromium.org/2489793002/#ps100001 (title: "fix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ========== to ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 ========== to ========== Use a proper URLLoaderAssociatedRequest in MojoAsyncResourceHandler tests We used to pass null URLLoaderAssociatedRequest to MojoAsyncResourceHandler. As we are planning to set an error_handler to the associated binding, we need to pass a proper URLLoaderAssociatedRequest. BUG=603396 Committed: https://crrev.com/ffcc0b4318abf391735e2eb2f46381a3264bd2c6 Cr-Commit-Position: refs/heads/master@{#431764} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/ffcc0b4318abf391735e2eb2f46381a3264bd2c6 Cr-Commit-Position: refs/heads/master@{#431764} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
