shill: Add Portal Detection object

Add a utility object that will perform a repeated test of an
HTTP URL and return the result to a callback.

BUG=chromium-os:23318
TEST=New unit tests

Change-Id: I0449dbe51fb1dcef2ecd3bb88de1bcaf2950f749
Reviewed-on: https://gerrit.chromium.org/gerrit/15472
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/dns_client_unittest.cc b/dns_client_unittest.cc
index 2df51cc..720240e 100644
--- a/dns_client_unittest.cc
+++ b/dns_client_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 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.
 
@@ -63,7 +63,7 @@
   }
 
   virtual void SetUp() {
-    EXPECT_CALL(time_, GetTimeOfDay(_, _))
+    EXPECT_CALL(time_, GetTimeMonotonic(_))
         .WillRepeatedly(DoAll(SetArgumentPointee<0>(time_val_), Return(0)));
     SetInActive();
   }
@@ -79,7 +79,7 @@
   void AdvanceTime(int time_ms) {
     struct timeval adv_time = { time_ms/1000, (time_ms % 1000) * 1000 };
     timeradd(&time_val_, &adv_time, &time_val_);
-    EXPECT_CALL(time_, GetTimeOfDay(_, _))
+    EXPECT_CALL(time_, GetTimeMonotonic(_))
         .WillRepeatedly(DoAll(SetArgumentPointee<0>(time_val_), Return(0)));
   }
 
@@ -274,7 +274,7 @@
   SetupRequest(kGoodName, kGoodServer);
   struct timeval init_time_val = time_val_;
   AdvanceTime(kAresTimeoutMS);
-  EXPECT_CALL(time_, GetTimeOfDay(_, _))
+  EXPECT_CALL(time_, GetTimeMonotonic(_))
       .WillOnce(DoAll(SetArgumentPointee<0>(init_time_val), Return(0)))
       .WillRepeatedly(DoAll(SetArgumentPointee<0>(time_val_), Return(0)));
   EXPECT_CALL(callback_target_, CallTarget(false));