[TaskScheduler]: Use ScopedBlockingCall to mark blocking tasks.
This CL uses ScopedBlockingCall to mark blocking calls in /chrome/browser/apps/platform_apps/.
This CL was created by replacing calls to AssertBlockingAllowed()
with instantiations of ScopedBlockingCall(MAY_BLOCK).
I kindly ask the reviewer to make sure of the following:
  - ScopedBlockingCall is instantiated in a scope with minimal CPU usage.
    If this is not the case, ScopedBlockingCall should be instantiated
    closer to the blocking call. See scoped_blocking_call.h for more
    info. Please let me know when/where the blocking call happens if this needs
    to be changed.
  - Parameter |blocking_type| matches expectation:
      MAY_BLOCK: The call might block (e.g. file I/O that might hit in memory cache).
      WILL_BLOCK: The call will definitely block (e.g. cache already checked and now pinging
        server synchronously).
    See BlockingType for more info. While I assumed MAY_BLOCK by default, that might
    not be the best fit if we know that this callsite is guaranteed to block.
  - The ScopedBlockingCall's scope covers the entirety of the blocking operation
    previously asserted against by the AssertBlockingAllowed().
This CL was uploaded by git cl split.
TBR=dominickn@chromium.org
Bug: 874080
Change-Id: Iceac744a259b8feaba56efc153c0eaed7392cf90
Reviewed-on: https://chromium-review.googlesource.com/c/1255601
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by:  Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602344}
Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602344}
Showing
Please register or sign in to comment