| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/browser_thread.h" | 5 #include "chrome/browser/browser_thread.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 | 9 |
| 10 // Friendly names for the well-known threads. | 10 // Friendly names for the well-known threads. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 return false; | 172 return false; |
| 173 } | 173 } |
| 174 | 174 |
| 175 // static | 175 // static |
| 176 scoped_refptr<base::MessageLoopProxy> | 176 scoped_refptr<base::MessageLoopProxy> |
| 177 BrowserThread::GetMessageLoopProxyForThread( | 177 BrowserThread::GetMessageLoopProxyForThread( |
| 178 ID identifier) { | 178 ID identifier) { |
| 179 scoped_refptr<base::MessageLoopProxy> proxy = | 179 scoped_refptr<base::MessageLoopProxy> proxy( |
| 180 new BrowserThreadMessageLoopProxy(identifier); | 180 new BrowserThreadMessageLoopProxy(identifier)); |
| 181 return proxy; | 181 return proxy; |
| 182 } | 182 } |
| 183 | 183 |
| 184 // static | 184 // static |
| 185 bool BrowserThread::PostTaskHelper( | 185 bool BrowserThread::PostTaskHelper( |
| 186 ID identifier, | 186 ID identifier, |
| 187 const tracked_objects::Location& from_here, | 187 const tracked_objects::Location& from_here, |
| 188 Task* task, | 188 Task* task, |
| 189 int64 delay_ms, | 189 int64 delay_ms, |
| 190 bool nestable) { | 190 bool nestable) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 213 } | 213 } |
| 214 } else { | 214 } else { |
| 215 delete task; | 215 delete task; |
| 216 } | 216 } |
| 217 | 217 |
| 218 if (!guaranteed_to_outlive_target_thread) | 218 if (!guaranteed_to_outlive_target_thread) |
| 219 lock_.Release(); | 219 lock_.Release(); |
| 220 | 220 |
| 221 return !!message_loop; | 221 return !!message_loop; |
| 222 } | 222 } |
| OLD | NEW |