OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/browser_thread_impl.h" | 5 #include "content/browser/browser_thread_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 delay); | 68 delay); |
69 } | 69 } |
70 | 70 |
71 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 71 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
72 base::OnceClosure task, | 72 base::OnceClosure task, |
73 base::TimeDelta delay) override { | 73 base::TimeDelta delay) override { |
74 return BrowserThread::PostNonNestableDelayedTask(id_, from_here, | 74 return BrowserThread::PostNonNestableDelayedTask(id_, from_here, |
75 std::move(task), delay); | 75 std::move(task), delay); |
76 } | 76 } |
77 | 77 |
78 bool RunsTasksOnCurrentThread() const override { | 78 bool RunsTasksInCurrentSequence() const override { |
79 return BrowserThread::CurrentlyOn(id_); | 79 return BrowserThread::CurrentlyOn(id_); |
80 } | 80 } |
81 | 81 |
82 protected: | 82 protected: |
83 ~BrowserThreadTaskRunner() override {} | 83 ~BrowserThreadTaskRunner() override {} |
84 | 84 |
85 private: | 85 private: |
86 BrowserThread::ID id_; | 86 BrowserThread::ID id_; |
87 DISALLOW_COPY_AND_ASSIGN(BrowserThreadTaskRunner); | 87 DISALLOW_COPY_AND_ASSIGN(BrowserThreadTaskRunner); |
88 }; | 88 }; |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 BrowserThreadDelegateAtomicPtr old_delegate = | 699 BrowserThreadDelegateAtomicPtr old_delegate = |
700 base::subtle::NoBarrier_AtomicExchange( | 700 base::subtle::NoBarrier_AtomicExchange( |
701 &globals.io_thread_delegate, | 701 &globals.io_thread_delegate, |
702 reinterpret_cast<BrowserThreadDelegateAtomicPtr>(delegate)); | 702 reinterpret_cast<BrowserThreadDelegateAtomicPtr>(delegate)); |
703 | 703 |
704 // This catches registration when previously registered. | 704 // This catches registration when previously registered. |
705 DCHECK(!delegate || !old_delegate); | 705 DCHECK(!delegate || !old_delegate); |
706 } | 706 } |
707 | 707 |
708 } // namespace content | 708 } // namespace content |
OLD | NEW |