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.cc b/nice_mock_control.cc
new file mode 100644
index 0000000..09e1917
--- /dev/null
+++ b/nice_mock_control.cc
@@ -0,0 +1,43 @@
+// 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.
+
+#include "shill/nice_mock_control.h"
+
+#include <gmock/gmock.h>
+
+#include "shill/mock_adaptors.h"
+
+using ::testing::NiceMock;
+
+namespace shill {
+
+NiceMockControl::NiceMockControl() {}
+
+NiceMockControl::~NiceMockControl() {}
+
+DeviceAdaptorInterface *NiceMockControl::CreateDeviceAdaptor(Device *device) {
+  return new NiceMock<DeviceMockAdaptor>();
+}
+
+IPConfigAdaptorInterface *NiceMockControl::CreateIPConfigAdaptor(
+    IPConfig *config) {
+  return new NiceMock<IPConfigMockAdaptor>();
+}
+
+ManagerAdaptorInterface *NiceMockControl::CreateManagerAdaptor(
+    Manager *manager) {
+  return new NiceMock<ManagerMockAdaptor>();
+}
+
+ProfileAdaptorInterface *NiceMockControl::CreateProfileAdaptor(
+    Profile *profile) {
+  return new NiceMock<ProfileMockAdaptor>();
+}
+
+ServiceAdaptorInterface *NiceMockControl::CreateServiceAdaptor(
+    Service *service) {
+  return new NiceMock<ServiceMockAdaptor>();
+}
+
+}  // namespace shill