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

Side by Side Diff: chrome/browser/resources/feedback/js/feedback.js

Issue 2742103002: Prevent adding an empty email option in the feedback app in guest mode (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 /** 5 /**
6 * @type {string} 6 * @type {string}
7 * @const 7 * @const
8 */ 8 */
9 var SRT_DOWNLOAD_PAGE = 'https://www.google.com/chrome/cleanup-tool/'; 9 var SRT_DOWNLOAD_PAGE = 'https://www.google.com/chrome/cleanup-tool/';
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 chrome.app.window.current().show(); 337 chrome.app.window.current().show();
338 338
339 var screenshotDataUrl = screenshotCanvas.toDataURL('image/png'); 339 var screenshotDataUrl = screenshotCanvas.toDataURL('image/png');
340 $('screenshot-image').src = screenshotDataUrl; 340 $('screenshot-image').src = screenshotDataUrl;
341 $('screenshot-image').classList.toggle('wide-screen', 341 $('screenshot-image').classList.toggle('wide-screen',
342 $('screenshot-image').width > MAX_SCREENSHOT_WIDTH); 342 $('screenshot-image').width > MAX_SCREENSHOT_WIDTH);
343 feedbackInfo.screenshot = dataUrlToBlob(screenshotDataUrl); 343 feedbackInfo.screenshot = dataUrlToBlob(screenshotDataUrl);
344 }); 344 });
345 345
346 chrome.feedbackPrivate.getUserEmail(function(email) { 346 chrome.feedbackPrivate.getUserEmail(function(email) {
347 // Never add an empty option.
348 if (!email)
349 return;
347 var optionElement = document.createElement('option'); 350 var optionElement = document.createElement('option');
348 optionElement.value = email; 351 optionElement.value = email;
349 optionElement.text = email; 352 optionElement.text = email;
350 optionElement.selected = true; 353 optionElement.selected = true;
351 // Make sure the "Report anonymously" option comes last. 354 // Make sure the "Report anonymously" option comes last.
352 $('user-email-drop-down').insertBefore(optionElement, 355 $('user-email-drop-down').insertBefore(optionElement,
353 $('anonymous-user-option')); 356 $('anonymous-user-option'));
354 }); 357 });
355 358
356 // Initiate getting the system info. 359 // Initiate getting the system info.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 $('cancel-button').onclick = cancel; 447 $('cancel-button').onclick = cancel;
445 $('remove-attached-file').onclick = clearAttachedFile; 448 $('remove-attached-file').onclick = clearAttachedFile;
446 // <if expr="chromeos"> 449 // <if expr="chromeos">
447 $('performance-info-checkbox').addEventListener( 450 $('performance-info-checkbox').addEventListener(
448 'change', performanceFeedbackChanged); 451 'change', performanceFeedbackChanged);
449 // </if> 452 // </if>
450 }); 453 });
451 } 454 }
452 455
453 initialize(); 456 initialize();
OLDNEW
« 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