shill: Add a mockable layer for socket.h.
Mock the layer in device_info_unittest.cc. Some cleanup.
BUG=chromium-os:17394
TEST=unit tests
Change-Id: I2ddcb2fd0e01418a463596bf4e3a804b3e3023b2
Reviewed-on: http://gerrit.chromium.org/gerrit/3807
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/shill_event.h b/shill_event.h
index bed38c7..2484554 100644
--- a/shill_event.h
+++ b/shill_event.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -29,6 +29,7 @@
public:
EventDispatcher();
virtual ~EventDispatcher();
+
void DispatchForever();
// These are thin wrappers around calls of the same name in
@@ -36,8 +37,10 @@
bool PostTask(Task* task);
bool PostDelayedTask(Task* task, int64 delay_ms);
- IOInputHandler *CreateInputHandler(int fd,
- Callback1<InputData*>::Type *callback);
+ virtual IOInputHandler *CreateInputHandler(
+ int fd,
+ Callback1<InputData*>::Type *callback);
+
private:
scoped_ptr<MessageLoop> dont_use_directly_;
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;