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

Side by Side Diff: remoting/base/auto_thread_task_runner.cc

Issue 10987053: [Chromoting] Remove CHECK() when posting a message to the plugin thread during shutdown. With the a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Propagate true/false from the wrapping task runner up. Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "remoting/base/auto_thread_task_runner.h" 5 #include "remoting/base/auto_thread_task_runner.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 10
(...skipping 22 matching lines...) Expand all
33 const base::Closure& stop_callback) 33 const base::Closure& stop_callback)
34 : parent_(parent), 34 : parent_(parent),
35 stop_callback_(stop_callback), 35 stop_callback_(stop_callback),
36 task_runner_(task_runner) { 36 task_runner_(task_runner) {
37 } 37 }
38 38
39 bool AutoThreadTaskRunner::PostDelayedTask( 39 bool AutoThreadTaskRunner::PostDelayedTask(
40 const tracked_objects::Location& from_here, 40 const tracked_objects::Location& from_here,
41 const base::Closure& task, 41 const base::Closure& task,
42 base::TimeDelta delay) { 42 base::TimeDelta delay) {
43 // CHECK() makes sure that |task_runner_| is still running, - the assumption 43 return task_runner_->PostDelayedTask(from_here, task, delay);
44 // made by |AutoThreadTaskRunner| owners.
45 CHECK(task_runner_->PostDelayedTask(from_here, task, delay));
46 return true;
47 } 44 }
48 45
49 bool AutoThreadTaskRunner::PostNonNestableDelayedTask( 46 bool AutoThreadTaskRunner::PostNonNestableDelayedTask(
50 const tracked_objects::Location& from_here, 47 const tracked_objects::Location& from_here,
51 const base::Closure& task, 48 const base::Closure& task,
52 base::TimeDelta delay) { 49 base::TimeDelta delay) {
53 // CHECK() makes sure that |task_runner_| is still running, - the assumption 50 return task_runner_->PostNonNestableDelayedTask(from_here, task, delay);
54 // made by |AutoThreadTaskRunner| owners.
55 CHECK(task_runner_->PostNonNestableDelayedTask(from_here, task, delay));
56 return true;
57 } 51 }
58 52
59 bool AutoThreadTaskRunner::RunsTasksOnCurrentThread() const { 53 bool AutoThreadTaskRunner::RunsTasksOnCurrentThread() const {
60 return task_runner_->RunsTasksOnCurrentThread(); 54 return task_runner_->RunsTasksOnCurrentThread();
61 } 55 }
62 56
63 AutoThreadTaskRunner::~AutoThreadTaskRunner() { 57 AutoThreadTaskRunner::~AutoThreadTaskRunner() {
64 if (!stop_callback_.is_null()) 58 if (!stop_callback_.is_null())
65 stop_callback_.Run(); 59 stop_callback_.Run();
66 } 60 }
67 61
68 } // namespace remoting 62 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698