shill: fix test failures in WiFiRoaming.005Suspend* tests

- update PowerManagerProxy to reflect the new path used
  by /usr/bin/powerd_suspend
  (see https://gerrit.chromium.org/gerrit/17161)
- flush wpa_supplicant's BSS cache on resume

TEST=WiFiRoaming.005Suspend*, unit tests
BUG=chromium-os:27394,chromium-os:27474,chromium-os:27473

Change-Id: I49166137a48f928121ce387c82b6e01948505405
Reviewed-on: https://gerrit.chromium.org/gerrit/17744
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/wifi.h b/wifi.h
index 1d0275d..90b61a2 100644
--- a/wifi.h
+++ b/wifi.h
@@ -5,6 +5,8 @@
 #ifndef SHILL_WIFI_
 #define SHILL_WIFI_
 
+#include <time.h>
+
 #include <map>
 #include <string>
 #include <vector>
@@ -78,6 +80,7 @@
   FRIEND_TEST(WiFiMainTest, InitialSupplicantState);  // kInterfaceStateUnknown
   FRIEND_TEST(WiFiMainTest, ScanResults);             // EndpointMap
   FRIEND_TEST(WiFiMainTest, ScanResultsWithUpdates);  // EndpointMap
+  FRIEND_TEST(WiFiMainTest, FlushBSSOnResume);  // kMaxBSSResumeAgeSeconds
   FRIEND_TEST(WiFiPropertyTest, ClearDerivedProperty);  // bgscan_method_
 
   typedef std::map<const std::string, WiFiEndpointRefPtr> EndpointMap;
@@ -93,6 +96,7 @@
   static const char kManagerErrorSSIDRequired[];
   static const char kManagerErrorUnsupportedSecurityMode[];
   static const char kManagerErrorUnsupportedServiceMode[];
+  static const time_t kMaxBSSResumeAgeSeconds;
   static const char kInterfaceStateUnknown[];
 
   std::string CreateBgscanConfigString();
@@ -154,6 +158,7 @@
 
   // Store cached copies of singletons for speed/ease of testing.
   ProxyFactory *proxy_factory_;
+  Time *time_;
 
   ScopedRunnableMethodFactory<WiFi> task_factory_;
   scoped_ptr<SupplicantProcessProxyInterface> supplicant_process_proxy_;
@@ -177,6 +182,10 @@
   std::string supplicant_bss_;
   // Signifies that ClearCachedCredentialsTask() is pending.
   bool clear_cached_credentials_pending_;
+  // Indicates that we should flush supplicant's BSS cache after the
+  // next scan completes.
+  bool need_bss_flush_;
+  struct timeval resumed_at_;
 
   // Properties
   std::string bgscan_method_;