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

Side by Side Diff: components/translate/ios/browser/resources/language_detection.js

Issue 2449333002: [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)
Patch Set: Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 __gCrWeb['languageDetection'] = {}; 5 /**
6 * @fileoverview Installs Language Detection management functions on the
7 * __gCrWeb object.
8 *
9 * TODO(crbug.com/659442): Enable checkTypes error for this file.
10 * @suppress {checkTypes}
11 */
6 12
13 __gCrWeb.languageDetection = {};
14 __gCrWeb['languageDetection'] = __gCrWeb.languageDetection;
7 15
8 (function() { 16 (function() {
9 /** 17 /**
10 * The cache of the text content that was extracted from the page 18 * The cache of the text content that was extracted from the page
11 */ 19 */
12 __gCrWeb.languageDetection.bufferedTextContent = null; 20 __gCrWeb.languageDetection.bufferedTextContent = null;
13 21
14 /** 22 /**
15 * The number of active requests that have populated the cache. This is 23 * The number of active requests that have populated the cache. This is
16 * incremented every time a call to |__gCrWeb.languageDetection.detectLanguage| 24 * incremented every time a call to |__gCrWeb.languageDetection.detectLanguage|
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 __gCrWeb.languageDetection['retrieveBufferedTextContent'] = function() { 163 __gCrWeb.languageDetection['retrieveBufferedTextContent'] = function() {
156 var textContent = __gCrWeb.languageDetection.bufferedTextContent; 164 var textContent = __gCrWeb.languageDetection.bufferedTextContent;
157 __gCrWeb.languageDetection.activeRequests -= 1; 165 __gCrWeb.languageDetection.activeRequests -= 1;
158 if (__gCrWeb.languageDetection.activeRequests == 0) { 166 if (__gCrWeb.languageDetection.activeRequests == 0) {
159 __gCrWeb.languageDetection.bufferedTextContent = null; 167 __gCrWeb.languageDetection.bufferedTextContent = null;
160 } 168 }
161 return textContent; 169 return textContent;
162 } 170 }
163 171
164 }()) // End of anonymous function. 172 }()) // End of anonymous function.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698