implement |is_foreground| for UpdateClient::Update calls

BUG=818069

Change-Id: Ie4989031929e5b65a0a783809d3ee588227e6a75
Reviewed-on: https://chromium-review.googlesource.com/944051
Reviewed-by: Joshua Pawlicki <[email protected]>
Reviewed-by: Devlin <[email protected]>
Commit-Queue: Sorin Jianu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540531}
diff --git a/components/update_client/component.h b/components/update_client/component.h
index d44e39a..c7112400 100644
--- a/components/update_client/component.h
+++ b/components/update_client/component.h
@@ -97,13 +97,7 @@
     update_check_error_ = update_check_error;
   }
 
-  // Returns the time when processing of an update for this component has
-  // begun, once the update has been discovered. Returns a null TimeTicks object
-  // if the handling of an update has not happened.
-  // base::TimeTicks update_begin() const { return update_begin_; }
-
-  bool on_demand() const { return on_demand_; }
-  void set_on_demand(bool on_demand) { on_demand_ = on_demand; }
+  bool is_foreground() const;
 
   const std::vector<std::string>& events() const { return events_; }
 
@@ -407,9 +401,6 @@
   // True if the update check response for this component includes an update.
   bool is_update_available_ = false;
 
-  // True if the current update check cycle is on-demand.
-  bool on_demand_ = false;
-
   // The error reported by the update checker.
   int update_check_error_ = 0;