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

Side by Side Diff: content/browser/browser_thread_impl.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 years, 7 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
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
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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 BrowserThreadDelegateAtomicPtr old_delegate = 682 BrowserThreadDelegateAtomicPtr old_delegate =
683 base::subtle::NoBarrier_AtomicExchange( 683 base::subtle::NoBarrier_AtomicExchange(
684 &globals.io_thread_delegate, 684 &globals.io_thread_delegate,
685 reinterpret_cast<BrowserThreadDelegateAtomicPtr>(delegate)); 685 reinterpret_cast<BrowserThreadDelegateAtomicPtr>(delegate));
686 686
687 // This catches registration when previously registered. 687 // This catches registration when previously registered.
688 DCHECK(!delegate || !old_delegate); 688 DCHECK(!delegate || !old_delegate);
689 } 689 }
690 690
691 } // namespace content 691 } // namespace content
OLDNEW
« no previous file with comments | « components/user_manager/fake_user_manager.cc ('k') | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698