UpdateEngine-side changes to allow updates over 3G based on device policy.

Some enterprise chromebooks have only 3G and hence they need the ability
to update over 3G if the enterprise policy allows that. This CL adds
the support in update_engine to enable that.

BUG=chromium-os:31099
TEST=Tested E2E on 3G, added unit tests and did regression testing.
CQ-DEPEND=I1a55a392f3dc0f12d917eb45dcf0456b57735514
Change-Id: I121bda35e54fa6c35e002a76db198d13b72b650e
Reviewed-on: https://gerrit.chromium.org/gerrit/25470
Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
diff --git a/multi_range_http_fetcher.h b/multi_range_http_fetcher.h
index 10829cc..5251bfe 100644
--- a/multi_range_http_fetcher.h
+++ b/multi_range_http_fetcher.h
@@ -34,7 +34,8 @@
  public:
   // Takes ownership of the passed in fetcher.
   explicit MultiRangeHttpFetcher(HttpFetcher* base_fetcher)
-      : HttpFetcher(base_fetcher->proxy_resolver()),
+      : HttpFetcher(base_fetcher->proxy_resolver(),
+                    base_fetcher->GetSystemState()),
         base_fetcher_(base_fetcher),
         base_fetcher_active_(false),
         pending_transfer_ended_(false),
@@ -78,9 +79,6 @@
   virtual void set_retry_seconds(int seconds) {
     base_fetcher_->set_retry_seconds(seconds);
   }
-  virtual void SetConnectionAsExpensive(bool is_expensive) {
-    base_fetcher_->SetConnectionAsExpensive(is_expensive);
-  }
   virtual void SetBuildType(bool is_official) {
     base_fetcher_->SetBuildType(is_official);
   }
@@ -114,11 +112,11 @@
   };
 
   typedef std::vector<Range> RangesVect;
-  
+
   // State change: Stopped or Downloading -> Downloading
   void StartTransfer();
 
-// State change: Downloading -> Downloading or Pending transfer ended
+  // State change: Downloading -> Downloading or Pending transfer ended
   virtual void ReceivedBytes(HttpFetcher* fetcher,
                              const char* bytes,
                              int length);
@@ -139,7 +137,7 @@
   // If true, the next fetcher needs to be started when TransferTerminated is
   // received from the current fetcher.
   bool pending_transfer_ended_;
-  
+
   // True if we are waiting for base fetcher to terminate b/c we are
   // ourselves terminating.
   bool terminating_;