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

Side by Side Diff: chrome/browser/resources/options/cookies_view.js

Issue 293063017: Updated to read remove all shown when the user searches for a cookie (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inserted the lines in cookies_view.js Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // CookiesView class: 10 // CookiesView class:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 chrome.send('updateCookieSearchResults', [filter]); 81 chrome.send('updateCookieSearchResults', [filter]);
82 } 82 }
83 }, 83 },
84 84
85 /** 85 /**
86 * Handles search query changes. 86 * Handles search query changes.
87 * @param {!Event} e The event object. 87 * @param {!Event} e The event object.
88 * @private 88 * @private
89 */ 89 */
90 handleSearchQueryChange_: function(e) { 90 handleSearchQueryChange_: function(e) {
91 var content = document.querySelector('.cookies-search-box').value;
92 if (content) {
93 document.querySelector('.remove-all-cookies-button').innerHTML =
94 loadTimeData.getString('remove_all_shown_cookie');
95 }
96 else {
97 document.querySelector('.remove-all-cookies-button').innerHTML =
98 loadTimeData.getString('remove_all_cookie');
99 }
Dan Beam 2014/05/24 02:03:52 i think you can shave some lines with this: var s
Dan Beam 2014/05/27 21:04:31 what happened to re-writing the code like this? ^
91 if (this.queryDelayTimerId_) 100 if (this.queryDelayTimerId_)
92 window.clearTimeout(this.queryDelayTimerId_); 101 window.clearTimeout(this.queryDelayTimerId_);
93 102
94 this.queryDelayTimerId_ = window.setTimeout( 103 this.queryDelayTimerId_ = window.setTimeout(
95 this.searchCookie.bind(this), 500); 104 this.searchCookie.bind(this), 500);
96 }, 105 },
97 106
98 initialized_: false, 107 initialized_: false,
99 108
100 /** 109 /**
(...skipping 30 matching lines...) Expand all
131 CookiesView.loadChildren = function(args) { 140 CookiesView.loadChildren = function(args) {
132 $('cookies-list').loadChildren(args[0], args[1]); 141 $('cookies-list').loadChildren(args[0], args[1]);
133 }; 142 };
134 143
135 // Export 144 // Export
136 return { 145 return {
137 CookiesView: CookiesView 146 CookiesView: CookiesView
138 }; 147 };
139 148
140 }); 149 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698