• fdoray's avatar
    Allow URLFetcher to be used from sequenced tasks. · dc3ecbb0
    fdoray authored
    Before this CL, URLFetcher could only be instantiated from a
    single-threaded task. The response was dispatched on the origin thread.
    
    With this CL, URLFetcher can also be instantiated from a sequenced
    task. The response is dispatched on the origin sequence.
    
    Since SequencedTaskRunnerHandle behaves the same way as
    ThreadTaskRunnerHandle when used from a single-threaded task, this
    CL does not affect the behavior of existing URLFetcher call sites
    (they are necessarily in single-threaded tasks because
    base::ThreadTaskRunnerHandle::Get() crashes when called from
    a non-single-threaded task).
    
    BUG=675631
    
    Review-Url: https://codereview.chromium.org/2599873002
    Cr-Commit-Position: refs/heads/master@{#443224}
    dc3ecbb0
url_fetcher_impl_unittest.cc 58.6 KB