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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js

Issue 812793002: Don't show ChromeVox release notes on a version change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Rebase on master. Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
index fb803d1f863b483abdebc2661a3b4614118e849c..177187b82ec8c81d9c82871f99281974d11131af 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
@@ -104,8 +104,6 @@ cvox.ChromeVoxBackground.prototype.init = function() {
this.onLoadStateChanged);
}
- this.checkVersionNumber();
-
// Set up a message passing system for goog.provide() calls from
// within the content scripts.
chrome.extension.onMessage.addListener(
@@ -423,67 +421,6 @@ cvox.ChromeVoxBackground.prototype.addBridgeListener = function() {
/**
- * Checks the version number. If it has changed, display release notes
- * to the user.
- */
-cvox.ChromeVoxBackground.prototype.checkVersionNumber = function() {
- // Don't update version or show release notes if the current tab is within an
- // incognito window (which may occur on ChromeOS immediately after OOBE).
- if (this.isIncognito_()) {
- return;
- }
- this.localStorageVersion = localStorage['versionString'];
- this.showNotesIfNewVersion();
-};
-
-
-/**
- * Display release notes to the user.
- */
-cvox.ChromeVoxBackground.prototype.displayReleaseNotes = function() {
- chrome.tabs.create(
- {'url': 'http://chromevox.com/release_notes.html'});
-};
-
-
-/**
- * Gets the current version number from the extension manifest.
- */
-cvox.ChromeVoxBackground.prototype.showNotesIfNewVersion = function() {
- // Check version number in manifest.
- var url = chrome.extension.getURL('manifest.json');
- var xhr = new XMLHttpRequest();
- var context = this;
- xhr.onreadystatechange = function() {
- if (xhr.readyState == 4) {
- var manifest = JSON.parse(xhr.responseText);
- console.log('Version: ' + manifest.version);
-
- var shouldShowReleaseNotes =
- (context.localStorageVersion != manifest.version);
-
- // On Chrome OS, don't show the release notes the first time, only
- // after a version upgrade.
- if (navigator.userAgent.indexOf('CrOS') != -1 &&
- context.localStorageVersion == undefined) {
- shouldShowReleaseNotes = false;
- }
-
- if (shouldShowReleaseNotes) {
- context.displayReleaseNotes();
- }
-
- // Update version number in local storage
- localStorage['versionString'] = manifest.version;
- this.localStorageVersion = manifest.version;
- }
- };
- xhr.open('GET', url);
- xhr.send();
-};
-
-
-/**
* Read and apply preferences that affect the background context.
*/
cvox.ChromeVoxBackground.prototype.readPrefs = function() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698