Commit e6ee2ef2 authored by mlerman's avatar mlerman Committed by Commit bot

Let guests on ChromeOS still search.

BUG=411178

Review URL: https://codereview.chromium.org/545953002

Cr-Commit-Position: refs/heads/master@{#293965}
parent 418e04ca
......@@ -17,6 +17,13 @@ cr.define('options', function() {
return el;
}
/**
* Prohibit search for guests on desktop.
*/
function ShouldEnableSearch() {
return !loadTimeData.getBoolean('profileIsGuest') || cr.isChromeOS;
}
SearchBubble.decorate = function(el) {
el.__proto__ = SearchBubble.prototype;
el.decorate();
......@@ -187,8 +194,7 @@ cr.define('options', function() {
if (!this.searchActive_ && !active)
return;
// Guest users should never have active search.
if (loadTimeData.getBoolean('profileIsGuest'))
if (!ShouldEnableSearch())
return;
this.searchActive_ = active;
......@@ -264,8 +270,7 @@ cr.define('options', function() {
* @private
*/
setSearchText_: function(text) {
// Guest users should never have search text.
if (loadTimeData.getBoolean('profileIsGuest'))
if (!ShouldEnableSearch())
return;
// Prevent recursive execution of this method.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment