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

Side by Side Diff: remoting/host/posix/signal_handler.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 | « remoting/host/mac/me2me_preference_pane.mm ('k') | rlz/lib/rlz_lib_test.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 // TODO(jamiewalch): Add unit tests for this. 5 // TODO(jamiewalch): Add unit tests for this.
6 6
7 #include "remoting/host/posix/signal_handler.h" 7 #include "remoting/host/posix/signal_handler.h"
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <signal.h> 10 #include <signal.h>
11 11
12 #include <list> 12 #include <list>
13 #include <utility> 13 #include <utility>
14 14
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/eintr_wrapper.h"
17 #include "base/message_loop.h" 16 #include "base/message_loop.h"
18 #include "base/message_pump_libevent.h" 17 #include "base/message_pump_libevent.h"
18 #include "base/posix/eintr_wrapper.h"
19 #include "base/threading/platform_thread.h" 19 #include "base/threading/platform_thread.h"
20 20
21 namespace remoting { 21 namespace remoting {
22 namespace { 22 namespace {
23 23
24 class SignalListener : public base::MessagePumpLibevent::Watcher { 24 class SignalListener : public base::MessagePumpLibevent::Watcher {
25 public: 25 public:
26 SignalListener(); 26 SignalListener();
27 27
28 void AddSignalHandler(int signal, const SignalHandler& handler); 28 void AddSignalHandler(int signal, const SignalHandler& handler);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 if (signal(signal_number, GlobalSignalHandler) == SIG_ERR) { 106 if (signal(signal_number, GlobalSignalHandler) == SIG_ERR) {
107 LOG(ERROR) << "signal() failed: " << errno; 107 LOG(ERROR) << "signal() failed: " << errno;
108 return false; 108 return false;
109 } 109 }
110 g_signal_listener->AddSignalHandler(signal_number, handler); 110 g_signal_listener->AddSignalHandler(signal_number, handler);
111 return true; 111 return true;
112 } 112 }
113 113
114 } // namespace remoting 114 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/mac/me2me_preference_pane.mm ('k') | rlz/lib/rlz_lib_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698