Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(852)

Unified Diff: chrome/browser/ui/webui/help/version_updater_chromeos.cc

Issue 1117263002: Switch on-demand update checks to the less-old GoogleUpdate3 API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to position 329622 Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/help/version_updater_chromeos.cc
diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos.cc b/chrome/browser/ui/webui/help/version_updater_chromeos.cc
index 2f10f818b4f9aee1061cdb57901eb9c38da19b45..1146ec3962b0902af5e82fd295f75150bb2a9a1c 100644
--- a/chrome/browser/ui/webui/help/version_updater_chromeos.cc
+++ b/chrome/browser/ui/webui/help/version_updater_chromeos.cc
@@ -22,6 +22,7 @@
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "chromeos/settings/cros_settings_names.h"
+#include "content/public/browser/web_contents.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
#include "ui/base/l10n/l10n_util.h"
@@ -109,8 +110,8 @@ bool EnsureCanUpdate(const VersionUpdater::StatusCallback& callback) {
} // namespace
-VersionUpdater* VersionUpdater::Create(content::BrowserContext* context) {
- return new VersionUpdaterCros(context);
+VersionUpdater* VersionUpdater::Create(content::WebContents* web_contents) {
+ return new VersionUpdaterCros(web_contents);
}
void VersionUpdaterCros::GetUpdateStatus(const StatusCallback& callback) {
@@ -181,8 +182,8 @@ void VersionUpdaterCros::GetChannel(bool get_current_channel,
update_engine_client->GetChannel(get_current_channel, cb);
}
-VersionUpdaterCros::VersionUpdaterCros(content::BrowserContext* context)
- : context_(context),
+VersionUpdaterCros::VersionUpdaterCros(content::WebContents* web_contents)
+ : context_(web_contents ? web_contents->GetBrowserContext() : nullptr),
last_operation_(UpdateEngineClient::UPDATE_STATUS_IDLE),
check_for_update_when_idle_(false),
weak_ptr_factory_(this) {

Powered by Google App Engine
This is Rietveld 408576698