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

Side by Side Diff: base/message_pump_libevent.cc

Issue 6469070: More DCHECK() updates. A mixture of _EQ and _GE. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updating pickle.h order Created 9 years, 9 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 | « base/i18n/bidi_line_iterator.cc ('k') | base/message_pump_win.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_pump_libevent.h" 5 #include "base/message_pump_libevent.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 int rv = event_del(e); 71 int rv = event_del(e);
72 delete e; 72 delete e;
73 pump_ = NULL; 73 pump_ = NULL;
74 watcher_ = NULL; 74 watcher_ = NULL;
75 return (rv == 0); 75 return (rv == 0);
76 } 76 }
77 77
78 void MessagePumpLibevent::FileDescriptorWatcher::Init(event *e, 78 void MessagePumpLibevent::FileDescriptorWatcher::Init(event *e,
79 bool is_persistent) { 79 bool is_persistent) {
80 DCHECK(e); 80 DCHECK(e);
81 DCHECK(event_ == NULL); 81 DCHECK(!event_);
82 82
83 is_persistent_ = is_persistent; 83 is_persistent_ = is_persistent;
84 event_ = e; 84 event_ = e;
85 } 85 }
86 86
87 event *MessagePumpLibevent::FileDescriptorWatcher::ReleaseEvent() { 87 event *MessagePumpLibevent::FileDescriptorWatcher::ReleaseEvent() {
88 struct event *e = event_; 88 struct event *e = event_;
89 event_ = NULL; 89 event_ = NULL;
90 return e; 90 return e;
91 } 91 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 // Remove and discard the wakeup byte. 347 // Remove and discard the wakeup byte.
348 char buf; 348 char buf;
349 int nread = HANDLE_EINTR(read(socket, &buf, 1)); 349 int nread = HANDLE_EINTR(read(socket, &buf, 1));
350 DCHECK_EQ(nread, 1); 350 DCHECK_EQ(nread, 1);
351 // Tell libevent to break out of inner loop. 351 // Tell libevent to break out of inner loop.
352 event_base_loopbreak(that->event_base_); 352 event_base_loopbreak(that->event_base_);
353 } 353 }
354 354
355 } // namespace base 355 } // namespace base
OLDNEW
« no previous file with comments | « base/i18n/bidi_line_iterator.cc ('k') | base/message_pump_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698