Chromium Code Reviews| Index: chrome/browser/ui/webui/help/version_updater_chromeos.h |
| diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos.h b/chrome/browser/ui/webui/help/version_updater_chromeos.h |
| index bfdee79df091d2ee082631bfd251bbf22c2a8099..aef2c3976b6a53c7b11f41de8da1355f509fb1fb 100644 |
| --- a/chrome/browser/ui/webui/help/version_updater_chromeos.h |
| +++ b/chrome/browser/ui/webui/help/version_updater_chromeos.h |
| @@ -24,6 +24,10 @@ class VersionUpdaterCros : public VersionUpdater, |
| // Gets the last update status, without triggering a new check or download. |
| void GetUpdateStatus(const StatusCallback& callback); |
| + void set_can_update_for_testing(bool can_update_for_testing) { |
| + can_update_for_testing_ = can_update_for_testing; |
| + } |
| + |
| protected: |
| friend class VersionUpdater; |
| @@ -39,12 +43,23 @@ class VersionUpdaterCros : public VersionUpdater, |
| // Callback from UpdateEngineClient::RequestUpdateCheck(). |
| void OnUpdateCheck(chromeos::UpdateEngineClient::UpdateCheckResult result); |
| + // Returns whether an update is allowed. If not, it calls the callback with |
| + // the appropriate status. |
| + bool EnsureCanUpdate(const StatusCallback& callback); |
|
James Hawkins
2014/09/18 16:34:03
I'm not sure this API is really where we should go
ygorshenin1
2014/09/18 19:46:47
Agree with you that the name of the method is not
James Hawkins
2014/09/22 16:48:31
GetUpdateStatus and don't return a bool? I don't
James Hawkins
2014/09/22 20:23:08
This comment is unresolved.
ygorshenin1
2014/09/23 10:23:16
I've moved back EnsureCanUpdate() to the anonymous
|
| + |
| // Callback used to communicate update status to the client. |
| StatusCallback callback_; |
| // Last state received via UpdateStatusChanged(). |
| chromeos::UpdateEngineClient::UpdateStatusOperation last_operation_; |
| + // True if an update check was scheduled when update engine'll move to an idle |
|
James Hawkins
2014/09/18 16:34:03
This comment is difficult to understand; there app
ygorshenin1
2014/09/18 19:46:47
Done.
|
| + // state. |
| + bool check_for_update_when_idle_; |
| + |
| + // True if an update check can be performed in tests. |
| + bool can_update_for_testing_; |
| + |
| base::WeakPtrFactory<VersionUpdaterCros> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(VersionUpdaterCros); |