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

Unified Diff: chrome/browser/resources/settings/about_page/about_page_browser_proxy.js

Issue 2873193002: Make update over cellular an option for user (Closed)
Patch Set: Put code in CHROME_OS wrapper to fix trybot error Created 3 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/resources/settings/about_page/about_page_browser_proxy.js
diff --git a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
index 2b592acb5631f84a196c887c13c8f205cfcb8abe..892ceca55f2b582980e94af803692b18cef2306f 100644
--- a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
+++ b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
@@ -34,6 +34,14 @@ var ChannelInfo;
*/
var VersionInfo;
+/**
+ * @typedef {{
+ * version: (string|undefined),
+ * size: (string|undefined),
+ * }}
+ */
+var AboutPageUpdateInfo;
+
/**
* Enumeration of all possible browser channels.
* @enum {string}
@@ -58,6 +66,7 @@ var UpdateStatus = {
FAILED: 'failed',
DISABLED: 'disabled',
DISABLED_BY_ADMIN: 'disabled_by_admin',
+ NEED_PERMISSION_TO_UPDATE: 'need_permission_to_update',
};
// <if expr="_google_chrome and is_macosx">
@@ -78,6 +87,8 @@ var PromoteUpdaterStatus;
* progress: (number|undefined),
* message: (string|undefined),
* connectionTypes: (string|undefined),
+ * version: (string|undefined),
+ * size: (string|undefined),
* }}
*/
var UpdateStatusChangedEvent;
@@ -146,6 +157,18 @@ cr.define('settings', function() {
*/
requestUpdate: function() {},
+ /**
+ * Checks for the update with specified version and size and applies over
+ * cellular. The target version and size are the same as were received from
+ * 'update-status-changed' WebUI event. We send this back all the way to
+ * update engine for it to double check with update server in case there's a
+ * new update available. This prevents downloading the new update that user
+ * didn't agree to.
+ * @param {string} target_version
+ * @param {string} target_size
+ */
+ requestUpdateOverCellular: function(target_version, target_size) {},
+
/**
* @param {!BrowserChannel} channel
* @param {boolean} isPowerwashAllowed
@@ -213,6 +236,11 @@ cr.define('settings', function() {
chrome.send('requestUpdate');
},
+ /** @override */
+ requestUpdateOverCellular: function(target_version, target_size) {
+ chrome.send('requestUpdateOverCellular', [target_version, target_size]);
+ },
+
/** @override */
setChannel: function(channel, isPowerwashAllowed) {
chrome.send('setChannel', [channel, isPowerwashAllowed]);

Powered by Google App Engine
This is Rietveld 408576698