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

Unified Diff: chrome/browser/resources/options/search_page.js

Issue 467363003: Guest mode causes certain settings to be hidden. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/options/search_page.js
diff --git a/chrome/browser/resources/options/search_page.js b/chrome/browser/resources/options/search_page.js
index 0152017b9fae2c119308020c7dd6905107ba86ef..f4bec5bccb8a45d958617194030c3287bb318d5b 100644
--- a/chrome/browser/resources/options/search_page.js
+++ b/chrome/browser/resources/options/search_page.js
@@ -187,6 +187,10 @@ cr.define('options', function() {
if (!this.searchActive_ && !active)
return;
+ // Guest users should never have active search
Evan Stade 2014/08/19 17:49:13 nit: final punctuation
Mike Lerman 2014/08/19 20:34:12 Done.
+ if (loadTimeData.getBoolean('profileIsGuest'))
+ return;
+
this.searchActive_ = active;
if (active) {
@@ -260,6 +264,10 @@ cr.define('options', function() {
* @private
*/
setSearchText_: function(text) {
+ // Guest users should never have search text.
+ if (loadTimeData.getBoolean('profileIsGuest'))
+ return;
+
// Prevent recursive execution of this method.
if (this.insideSetSearchText_) return;
this.insideSetSearchText_ = true;

Powered by Google App Engine
This is Rietveld 408576698