OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ios/web/web_thread_adapter.h" | 5 #include "ios/web/web_thread_adapter.h" |
6 | 6 |
7 #include "content/public/browser/browser_thread.h" | 7 #include "content/public/browser/browser_thread.h" |
8 | 8 |
9 namespace web { | 9 namespace web { |
10 | 10 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 bool WebThread::GetCurrentThreadIdentifier(ID* identifier) { | 157 bool WebThread::GetCurrentThreadIdentifier(ID* identifier) { |
158 content::BrowserThread::ID content_identifier; | 158 content::BrowserThread::ID content_identifier; |
159 bool result = | 159 bool result = |
160 content::BrowserThread::GetCurrentThreadIdentifier(&content_identifier); | 160 content::BrowserThread::GetCurrentThreadIdentifier(&content_identifier); |
161 if (result) | 161 if (result) |
162 *identifier = WebThreadIDFromBrowserThreadID(content_identifier); | 162 *identifier = WebThreadIDFromBrowserThreadID(content_identifier); |
163 return result; | 163 return result; |
164 } | 164 } |
165 | 165 |
166 // static | 166 // static |
167 scoped_refptr<base::MessageLoopProxy> WebThread::GetMessageLoopProxyForThread( | 167 scoped_refptr<base::SingleThreadTaskRunner> WebThread::GetTaskRunnerForThread( |
168 ID identifier) { | 168 ID identifier) { |
169 return content::BrowserThread::GetMessageLoopProxyForThread( | 169 return content::BrowserThread::GetMessageLoopProxyForThread( |
170 BrowserThreadIDFromWebThreadID(identifier)); | 170 BrowserThreadIDFromWebThreadID(identifier)); |
171 } | 171 } |
172 | 172 |
173 // static | 173 // static |
174 std::string WebThread::GetDCheckCurrentlyOnErrorMessage(ID expected) { | 174 std::string WebThread::GetDCheckCurrentlyOnErrorMessage(ID expected) { |
175 return content::BrowserThread::GetDCheckCurrentlyOnErrorMessage( | 175 return content::BrowserThread::GetDCheckCurrentlyOnErrorMessage( |
176 BrowserThreadIDFromWebThreadID(expected)); | 176 BrowserThreadIDFromWebThreadID(expected)); |
177 } | 177 } |
178 | 178 |
179 } // namespace web | 179 } // namespace web |
OLD | NEW |