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

Unified Diff: chrome/browser/resources/feedback.js

Issue 10007041: JavaScript style fixups in feedback.js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« 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/feedback.js
diff --git a/chrome/browser/resources/feedback.js b/chrome/browser/resources/feedback.js
index c5293401db7f81b71fdcde4621d6b3181356c9d8..974d96709b81a16774995a085e62b4865cc917da 100644
--- a/chrome/browser/resources/feedback.js
+++ b/chrome/browser/resources/feedback.js
@@ -20,6 +20,8 @@ var localStrings = new LocalStrings();
/**
* Selects an image thumbnail in the specified div.
+ * @param {string} divId The id of the div to search in.
Dan Beam 2012/04/06 20:53:57 The ID in which searching will occur.
+ * @param {string} thumbnailId The id of the thumbnail to search for.
Dan Beam 2012/04/06 20:53:57 The ID of the thumbnail for which to search.
*/
Dan Beam 2012/04/06 20:53:57 I'm just messing with you.
function selectImage(divId, thumbnailId) {
var thumbnailDivs = $(divId).children;
@@ -43,6 +45,8 @@ function selectImage(divId, thumbnailId) {
/**
* Adds an image thumbnail to the specified div.
+ * @param {string} divId The id of the div to add a screenshot to.
+ * @param {string} screenshot The URL of the screenshot being added.
*/
function addScreenshot(divId, screenshot) {
var thumbnailDiv = document.createElement('div');
@@ -86,9 +90,10 @@ function disableScreenshots() {
}
/**
- * Send's the report; after the report is sent, we need to be redirected to
+ * Sends the report; after the report is sent, we need to be redirected to
* the landing page, but we shouldn't be able to navigate back, hence
* we open the landing page in a new tab and sendReport closes this tab.
+ * @return {boolean} true if the report was sent.
Dan Beam 2012/04/06 20:53:57 capitalize
Tyler Breisacher (Chromium) 2012/04/19 19:47:27 Done.
*/
function sendReport() {
if ($('description-text').value.length == 0) {
@@ -123,6 +128,10 @@ function sendReport() {
return true;
}
+/**
+ * Click listener for the cancel button.
+ * @return {boolean} true
+ */
function cancel() {
chrome.send('cancel');
return true;
Tyler Breisacher (Chromium) 2012/04/06 18:31:38 I'm not entirely sure whether this 'return true;'
Dan Beam 2012/04/06 20:53:57 It's probably not, as that doesn't modify the even
Tyler Breisacher (Chromium) 2012/04/19 19:47:27 Let's leave it for now, just in case.
@@ -141,8 +150,6 @@ function currentSelected() {
if (selectedThumbnailDivId != 'current-screenshots')
selectImage('current-screenshots',
savedThumbnailIds['current-screenshots']);
-
- return true;
Tyler Breisacher (Chromium) 2012/04/06 18:31:38 This return value is never checked, as far as I ca
}
/**
@@ -160,8 +167,6 @@ function savedSelected() {
if (selectedThumbnailDivId != 'saved-screenshots')
selectImage('saved-screenshots', savedThumbnailIds['saved-screenshots']);
}
-
- return true;
Tyler Breisacher (Chromium) 2012/04/06 18:31:38 This return value is never checked, as far as I ca
}
« 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