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

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

Issue 545953002: Let guests on ChromeOS still search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One line function Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3fc5e2dfcb8b5a2d7b3b9a8d92b3c103ec89fae5 100644
--- a/chrome/browser/resources/options/search_page.js
+++ b/chrome/browser/resources/options/search_page.js
@@ -17,6 +17,13 @@ cr.define('options', function() {
return el;
}
+ /**
+ * Prohibit search for guests on desktop.
+ */
+ function ShouldEnableSearch() {
+ return (!loadTimeData.getBoolean('profileIsGuest') || cr.isChromeOS);
Evan Stade 2014/09/08 18:42:17 sorry I put parentheses in my previous comment. I
+ }
+
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.
« 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