Chromium Code Reviews| 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 d5b982671c212a580244a490bcc13992470809a6..c4cdbe5ad598c0b9795c3a6c54cbc6128eb6c706 100644 |
| --- a/chrome/browser/resources/options/search_page.js |
| +++ b/chrome/browser/resources/options/search_page.js |
| @@ -17,6 +17,15 @@ cr.define('options', function() { |
| return el; |
| } |
| + /** |
| + * Guests on Desktop cannot search. Permitted otherwise. |
| + */ |
| + function ShouldEnableSearch() { |
| + if (loadTimeData.getBoolean('profileIsGuest') && !cr.isChromeOS) |
|
Evan Stade
2014/09/05 21:02:33
return (expression);
Mike Lerman
2014/09/08 13:51:14
Done.
|
| + return false; |
| + return true; |
| + } |
| + |
| SearchBubble.decorate = function(el) { |
| el.__proto__ = SearchBubble.prototype; |
| el.decorate(); |
| @@ -187,8 +196,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 +272,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. |