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

Side by Side Diff: headless/public/util/expedited_dispatcher.cc

Issue 2260793002: Headless utility classes for making deterministic protocol handlers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "headless/public/util/expedited_dispatcher.h"
6
7 #include <utility>
8
9 #include "base/bind.h"
10 #include "headless/public/util/managed_dispatch_url_request_job.h"
11
12 namespace headless {
13
14 ExpeditedDispatcher::ExpeditedDispatcher(
15 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner)
16 : io_thread_task_runner_(std::move(io_thread_task_runner)) {}
17
18 ExpeditedDispatcher::~ExpeditedDispatcher() {}
19
20 void ExpeditedDispatcher::JobCreated(ManagedDispatchURLRequestJob*) {}
21
22 void ExpeditedDispatcher::JobKilled(ManagedDispatchURLRequestJob*) {}
23
24 void ExpeditedDispatcher::JobFailed(ManagedDispatchURLRequestJob* job,
25 net::Error error) {
26 io_thread_task_runner_->PostTask(
27 FROM_HERE, base::Bind(&ManagedDispatchURLRequestJob::OnStartError,
28 base::Unretained(job), error));
29 }
30
31 void ExpeditedDispatcher::DataReady(ManagedDispatchURLRequestJob* job) {
32 io_thread_task_runner_->PostTask(
33 FROM_HERE, base::Bind(&ManagedDispatchURLRequestJob::OnHeadersComplete,
34 base::Unretained(job)));
35 }
36
37 void ExpeditedDispatcher::JobDeleted(ManagedDispatchURLRequestJob*) {}
38
39 } // namespace headless
OLDNEW
« no previous file with comments | « headless/public/util/expedited_dispatcher.h ('k') | headless/public/util/expedited_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698