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

Side by Side Diff: chrome/browser/ui/webui/help/version_updater_chromeos.cc

Issue 2060623002: Implementation of Device End of Life Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify browsertest Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/help/version_updater_chromeos.h" 5 #include "chrome/browser/ui/webui/help/version_updater_chromeos.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 void VersionUpdaterCros::GetChannel(bool get_current_channel, 173 void VersionUpdaterCros::GetChannel(bool get_current_channel,
174 const ChannelCallback& cb) { 174 const ChannelCallback& cb) {
175 UpdateEngineClient* update_engine_client = 175 UpdateEngineClient* update_engine_client =
176 DBusThreadManager::Get()->GetUpdateEngineClient(); 176 DBusThreadManager::Get()->GetUpdateEngineClient();
177 177
178 // Request the channel information. 178 // Request the channel information.
179 update_engine_client->GetChannel(get_current_channel, cb); 179 update_engine_client->GetChannel(get_current_channel, cb);
180 } 180 }
181 181
182 void VersionUpdaterCros::GetEolStatus(const EolStatusCallback& cb) {
183 UpdateEngineClient* update_engine_client =
184 DBusThreadManager::Get()->GetUpdateEngineClient();
185
186 // Request the Eol Status.
187 update_engine_client->GetEolStatus(cb);
188 }
189
182 VersionUpdaterCros::VersionUpdaterCros(content::WebContents* web_contents) 190 VersionUpdaterCros::VersionUpdaterCros(content::WebContents* web_contents)
183 : context_(web_contents ? web_contents->GetBrowserContext() : nullptr), 191 : context_(web_contents ? web_contents->GetBrowserContext() : nullptr),
184 last_operation_(UpdateEngineClient::UPDATE_STATUS_IDLE), 192 last_operation_(UpdateEngineClient::UPDATE_STATUS_IDLE),
185 check_for_update_when_idle_(false), 193 check_for_update_when_idle_(false),
186 weak_ptr_factory_(this) { 194 weak_ptr_factory_(this) {
187 } 195 }
188 196
189 VersionUpdaterCros::~VersionUpdaterCros() { 197 VersionUpdaterCros::~VersionUpdaterCros() {
190 UpdateEngineClient* update_engine_client = 198 UpdateEngineClient* update_engine_client =
191 DBusThreadManager::Get()->GetUpdateEngineClient(); 199 DBusThreadManager::Get()->GetUpdateEngineClient();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 257 }
250 } 258 }
251 259
252 void VersionUpdaterCros::OnUpdateCheck( 260 void VersionUpdaterCros::OnUpdateCheck(
253 UpdateEngineClient::UpdateCheckResult result) { 261 UpdateEngineClient::UpdateCheckResult result) {
254 // If version updating is not implemented, this binary is the most up-to-date 262 // If version updating is not implemented, this binary is the most up-to-date
255 // possible with respect to automatic updating. 263 // possible with respect to automatic updating.
256 if (result == UpdateEngineClient::UPDATE_RESULT_NOTIMPLEMENTED) 264 if (result == UpdateEngineClient::UPDATE_RESULT_NOTIMPLEMENTED)
257 callback_.Run(UPDATED, 0, base::string16()); 265 callback_.Run(UPDATED, 0, base::string16());
258 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698