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

Side by Side Diff: jingle/glue/task_pump.cc

Issue 67673003: Move WeakPtrFactory members in jingle/ classes to the correct locations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « jingle/glue/task_pump.h ('k') | jingle/glue/thread_wrapper.h » ('j') | 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "jingle/glue/task_pump.h" 7 #include "jingle/glue/task_pump.h"
8 8
9 namespace jingle_glue { 9 namespace jingle_glue {
10 10
11 TaskPump::TaskPump() 11 TaskPump::TaskPump()
12 : weak_factory_(this), 12 : posted_wake_(false),
13 posted_wake_(false), 13 stopped_(false),
14 stopped_(false) {} 14 weak_factory_(this) {
15 }
15 16
16 TaskPump::~TaskPump() { 17 TaskPump::~TaskPump() {
17 DCHECK(CalledOnValidThread()); 18 DCHECK(CalledOnValidThread());
18 } 19 }
19 20
20 void TaskPump::WakeTasks() { 21 void TaskPump::WakeTasks() {
21 DCHECK(CalledOnValidThread()); 22 DCHECK(CalledOnValidThread());
22 if (!stopped_ && !posted_wake_) { 23 if (!stopped_ && !posted_wake_) {
23 base::MessageLoop* current_message_loop = base::MessageLoop::current(); 24 base::MessageLoop* current_message_loop = base::MessageLoop::current();
24 CHECK(current_message_loop); 25 CHECK(current_message_loop);
(...skipping 25 matching lines...) Expand all
50 // We shouldn't be using libjingle for timeout tasks, so we should 51 // We shouldn't be using libjingle for timeout tasks, so we should
51 // have no timeout tasks at all. 52 // have no timeout tasks at all.
52 53
53 // TODO(akalin): Add HasTimeoutTask() back in TaskRunner class and 54 // TODO(akalin): Add HasTimeoutTask() back in TaskRunner class and
54 // uncomment this check. 55 // uncomment this check.
55 // DCHECK(!HasTimeoutTask()) 56 // DCHECK(!HasTimeoutTask())
56 RunTasks(); 57 RunTasks();
57 } 58 }
58 59
59 } // namespace jingle_glue 60 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « jingle/glue/task_pump.h ('k') | jingle/glue/thread_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698