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

Side by Side Diff: chrome/browser/resources/net_internals/main.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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 /** 5 /**
6 * Dictionary of constants (Initialized soon after loading by data from browser, 6 * Dictionary of constants (Initialized soon after loading by data from browser,
7 * updated on load log). The *Types dictionaries map strings to numeric IDs, 7 * updated on load log). The *Types dictionaries map strings to numeric IDs,
8 * while the *TypeNames are the other way around. 8 * while the *TypeNames are the other way around.
9 */ 9 */
10 var EventType = null; 10 var EventType = null;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 window.location.hash = newTabHash; 219 window.location.hash = newTabHash;
220 } 220 }
221 }, 221 },
222 222
223 onUrlHashChange_: function() { 223 onUrlHashChange_: function() {
224 var parsed = parseUrlHash_(window.location.hash); 224 var parsed = parseUrlHash_(window.location.hash);
225 225
226 if (!parsed) 226 if (!parsed)
227 return; 227 return;
228 228
229 if (parsed.tabHash == "#export") { 229 if (parsed.tabHash == '#export') {
230 // The #export tab was removed in M60, after having been 230 // The #export tab was removed in M60, after having been
231 // deprecated since M58. In case anyone *still* has URLs 231 // deprecated since M58. In case anyone *still* has URLs
232 // bookmarked to this, inform them and redirect. 232 // bookmarked to this, inform them and redirect.
233 // TODO(eroman): Delete this around M62. 233 // TODO(eroman): Delete this around M62.
234 parsed.tabHash = undefined; 234 parsed.tabHash = undefined;
235 235
236 // Done on a setTimeout so it doesn't block the initial 236 // Done on a setTimeout so it doesn't block the initial
237 // page load (confirm() is synchronous). 237 // page load (confirm() is synchronous).
238 setTimeout(() => { 238 setTimeout(() => {
239 var navigateToNetExport = confirm( 239 var navigateToNetExport = confirm(
240 "#export was removed\nDo you want to navigate to " + 240 '#export was removed\nDo you want to navigate to ' +
241 "chrome://net-export/ instead?"); 241 'chrome://net-export/ instead?');
242 if (navigateToNetExport) { 242 if (navigateToNetExport) {
243 window.location.href = "chrome://net-export"; 243 window.location.href = 'chrome://net-export';
244 return; 244 return;
245 } 245 }
246 }); 246 });
247 } 247 }
248 248
249 if (!parsed.tabHash) { 249 if (!parsed.tabHash) {
250 // Default to the events tab. 250 // Default to the events tab.
251 parsed.tabHash = EventsView.TAB_HASH; 251 parsed.tabHash = EventsView.TAB_HASH;
252 } 252 }
253 253
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 * Returns the name for sdchProblemCode. 406 * Returns the name for sdchProblemCode.
407 * 407 *
408 * Example: sdchProblemCodeToString(5) should return 408 * Example: sdchProblemCodeToString(5) should return
409 * "DECODE_BODY_ERROR". 409 * "DECODE_BODY_ERROR".
410 * @param {number} sdchProblemCode The SDCH problem code. 410 * @param {number} sdchProblemCode The SDCH problem code.
411 * @return {string} The name of the given problem code. 411 * @return {string} The name of the given problem code.
412 */ 412 */
413 function sdchProblemCodeToString(sdchProblemCode) { 413 function sdchProblemCodeToString(sdchProblemCode) {
414 return getKeyWithValue(SdchProblemCode, sdchProblemCode); 414 return getKeyWithValue(SdchProblemCode, sdchProblemCode);
415 } 415 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698