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

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: Change visibility to CSS controlled 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..d5b982671c212a580244a490bcc13992470809a6 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.
+ 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;
« no previous file with comments | « chrome/browser/resources/options/options.html ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698