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

Side by Side Diff: tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html

Issue 2390373003: Change all == to === and != to !== in trace viewer. (Closed)
Patch Set: more changes from code review Created 4 years, 2 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/importer/importer.html"> 8 <link rel="import" href="/tracing/importer/importer.html">
9 9
10 <script> 10 <script>
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 GcloudTraceImporter.canImport = function(eventData) { 26 GcloudTraceImporter.canImport = function(eventData) {
27 if (typeof(eventData) !== 'string' && !(eventData instanceof String)) 27 if (typeof(eventData) !== 'string' && !(eventData instanceof String))
28 return false; 28 return false;
29 29
30 // Slice the data so we don't potentially do a replace on a gigantic string. 30 // Slice the data so we don't potentially do a replace on a gigantic string.
31 var normalizedEventData = eventData.slice(0, 20).replace(/\s/g, ''); 31 var normalizedEventData = eventData.slice(0, 20).replace(/\s/g, '');
32 if (normalizedEventData.length < 14) 32 if (normalizedEventData.length < 14)
33 return false; 33 return false;
34 34
35 return normalizedEventData.slice(0, 14) == '{"projectId":"'; 35 return normalizedEventData.slice(0, 14) === '{"projectId":"';
36 }; 36 };
37 37
38 GcloudTraceImporter.prototype = { 38 GcloudTraceImporter.prototype = {
39 39
40 __proto__: tr.importer.Importer.prototype, 40 __proto__: tr.importer.Importer.prototype,
41 41
42 get importerName() { 42 get importerName() {
43 return 'GcloudTraceImporter'; 43 return 'GcloudTraceImporter';
44 }, 44 },
45 45
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 }; 91 };
92 92
93 tr.importer.Importer.register(GcloudTraceImporter); 93 tr.importer.Importer.register(GcloudTraceImporter);
94 94
95 return { 95 return {
96 GcloudTraceImporter: GcloudTraceImporter 96 GcloudTraceImporter: GcloudTraceImporter
97 }; 97 };
98 }); 98 });
99 </script> 99 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/extras/importer/etw/thread_parser.html ('k') | tracing/tracing/extras/importer/gzip_importer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698