shill: wifi cleanups

three cleanups:
- WiFi and WiFiService: rename deferred task handlers (RealScanDone
  and RealConnect) from Real<Func> to <Func>Task. this makes them
  consistent with the naming in Modem.

- WiFiMainTest:
  - use scoped_ptrs (rather than bare) for references to mock
    proxies. this simplifies memory management, and makes WiFiMainTest
    more consistent with DHCPConfigTest
  - eliminate "uninteresting mock function call" messages

BUG=chromium-os:18349
TEST=FEATURES="test nostrip noclean" emerge-x86-generic shill

Change-Id: Ia4f340ab861c5a0ae44a730ca3e1a664ca03180a
Reviewed-on: http://gerrit.chromium.org/gerrit/4939
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/nice_mock_control.h b/nice_mock_control.h
new file mode 100644
index 0000000..b8686f4
--- /dev/null
+++ b/nice_mock_control.h
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef SHILL_NICE_MOCK_CONTROL_
+#define SHILL_NICE_MOCK_CONTROL_
+
+#include <base/basictypes.h>
+
+#include "shill/control_interface.h"
+
+namespace shill {
+// An implementation of the Shill RPC-channel-interface-factory interface that
+// returns nice mocks.
+class NiceMockControl : public ControlInterface {
+ public:
+  NiceMockControl();
+  virtual ~NiceMockControl();
+
+  // Each of these can be called once.  Ownership of the appropriate
+  // interface pointer is given up upon call.
+  virtual DeviceAdaptorInterface *CreateDeviceAdaptor(Device *device);
+  virtual IPConfigAdaptorInterface *CreateIPConfigAdaptor(IPConfig *config);
+  virtual ManagerAdaptorInterface *CreateManagerAdaptor(Manager *manager);
+  virtual ProfileAdaptorInterface *CreateProfileAdaptor(Profile *profile);
+  virtual ServiceAdaptorInterface *CreateServiceAdaptor(Service *service);
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(NiceMockControl);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_NICE_MOCK_CONTROL_