net: Add SetUploadStream method to URLFetcher.
[chromium-blink-merge.git] / ios / web / web_thread.cc
blob7fa4c06f8b7e35439c66f62c2443b8366b3a873b
1 // Copyright 2014 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.
5 #include "ios/web/public/web_thread.h"
7 #include "content/public/browser/browser_thread.h"
8 #include "ios/web/web_thread_impl.h"
10 namespace web {
12 // static
13 bool WebThread::PostTask(ID identifier,
14 const tracked_objects::Location& from_here,
15 const base::Closure& task) {
16 return content::BrowserThread::PostTask(
17 BrowserThreadIDFromWebThreadID(identifier), from_here, task);
20 // static
21 bool WebThread::PostDelayedTask(ID identifier,
22 const tracked_objects::Location& from_here,
23 const base::Closure& task,
24 base::TimeDelta delay) {
25 return content::BrowserThread::PostDelayedTask(
26 BrowserThreadIDFromWebThreadID(identifier), from_here, task, delay);
29 // static
30 bool WebThread::PostTaskAndReply(ID identifier,
31 const tracked_objects::Location& from_here,
32 const base::Closure& task,
33 const base::Closure& reply) {
34 return content::BrowserThread::PostTaskAndReply(
35 BrowserThreadIDFromWebThreadID(identifier), from_here, task, reply);
38 // static
39 bool WebThread::PostBlockingPoolTask(const tracked_objects::Location& from_here,
40 const base::Closure& task) {
41 return content::BrowserThread::PostBlockingPoolTask(from_here, task);
44 // static
45 bool WebThread::PostBlockingPoolSequencedTask(
46 const std::string& sequence_token_name,
47 const tracked_objects::Location& from_here,
48 const base::Closure& task) {
49 return content::BrowserThread::PostBlockingPoolSequencedTask(
50 sequence_token_name, from_here, task);
53 // static
54 base::SequencedWorkerPool* WebThread::GetBlockingPool() {
55 return content::BrowserThread::GetBlockingPool();
58 // static
59 base::MessageLoop* WebThread::UnsafeGetMessageLoopForThread(ID identifier) {
60 return content::BrowserThread::UnsafeGetMessageLoopForThread(
61 BrowserThreadIDFromWebThreadID(identifier));
64 // static
65 bool WebThread::CurrentlyOn(ID identifier) {
66 return content::BrowserThread::CurrentlyOn(
67 BrowserThreadIDFromWebThreadID(identifier));
70 // static
71 scoped_refptr<base::MessageLoopProxy> WebThread::GetMessageLoopProxyForThread(
72 ID identifier) {
73 return content::BrowserThread::GetMessageLoopProxyForThread(
74 BrowserThreadIDFromWebThreadID(identifier));
77 // static
78 std::string WebThread::GetDCheckCurrentlyOnErrorMessage(ID expected) {
79 return content::BrowserThread::GetDCheckCurrentlyOnErrorMessage(
80 BrowserThreadIDFromWebThreadID(expected));
83 } // namespace web