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

Side by Side Diff: base/message_pump_glib.cc

Issue 11366229: Move eintr_wrapper.h from base to base/posix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « base/message_loop_unittest.cc ('k') | base/message_pump_libevent.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) 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/message_pump_glib.h" 5 #include "base/message_pump_glib.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include <glib.h> 10 #include <glib.h>
11 11
12 #include "base/eintr_wrapper.h"
13 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/posix/eintr_wrapper.h"
14 #include "base/threading/platform_thread.h" 14 #include "base/threading/platform_thread.h"
15 15
16 namespace { 16 namespace {
17 17
18 // Return a timeout suitable for the glib loop, -1 to block forever, 18 // Return a timeout suitable for the glib loop, -1 to block forever,
19 // 0 to return right away, or a timeout in milliseconds from now. 19 // 0 to return right away, or a timeout in milliseconds from now.
20 int GetTimeIntervalMilliseconds(const base::TimeTicks& from) { 20 int GetTimeIntervalMilliseconds(const base::TimeTicks& from) {
21 if (from.is_null()) 21 if (from.is_null())
22 return -1; 22 return -1;
23 23
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 g_source_unref(work_source_); 321 g_source_unref(work_source_);
322 close(wakeup_pipe_read_); 322 close(wakeup_pipe_read_);
323 close(wakeup_pipe_write_); 323 close(wakeup_pipe_write_);
324 } 324 }
325 325
326 MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() { 326 MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() {
327 return state_ ? state_->dispatcher : NULL; 327 return state_ ? state_->dispatcher : NULL;
328 } 328 }
329 329
330 } // namespace base 330 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/message_pump_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698