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

Side by Side Diff: third_party/libjingle/files/talk/base/taskrunner.h

Issue 391027: Fix mediator_thread_impl.cc to run timer tasks when the task runner is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « chrome/browser/sync/notifier/listener/mediator_thread_impl.cc ('k') | 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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004--2006, Google Inc. 3 * Copyright 2004--2006, Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void StartTask(Task *task); 55 void StartTask(Task *task);
56 void RunTasks(); 56 void RunTasks();
57 void PollTasks(); 57 void PollTasks();
58 58
59 void UpdateTaskTimeout(Task *task); 59 void UpdateTaskTimeout(Task *task);
60 60
61 // dummy state machine - never run. 61 // dummy state machine - never run.
62 virtual int ProcessStart() { return STATE_DONE; } 62 virtual int ProcessStart() { return STATE_DONE; }
63 63
64 bool HasPendingTimeoutTask() {
65 return next_timeout_task_ != NULL &&
66 next_timeout_task_->TimedOut();
tim (not reviewing) 2009/11/12 19:42:53 nit - indent 2 more.
67 }
68
64 private: 69 private:
65 std::vector<Task *> tasks_; 70 std::vector<Task *> tasks_;
66 Task *next_timeout_task_; 71 Task *next_timeout_task_;
67 bool tasks_running_; 72 bool tasks_running_;
68 73
69 void RecalcNextTimeout(Task *exclude_task); 74 void RecalcNextTimeout(Task *exclude_task);
70 }; 75 };
71 76
72 } // namespace talk_base 77 } // namespace talk_base
73 78
74 #endif // TASK_BASE_TASKRUNNER_H__ 79 #endif // TASK_BASE_TASKRUNNER_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/notifier/listener/mediator_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698