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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfileTypeRegistry.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: all done 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/profiler/ProfileTypeRegistry.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/ProfileTypeRegistry.js b/third_party/WebKit/Source/devtools/front_end/profiler/ProfileTypeRegistry.js
index 343971094392c344c67b29889bbf72b8bd1e4856..8383b46b8b86f3f02ab2f039691ea45b69bfa2d9 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/ProfileTypeRegistry.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/ProfileTypeRegistry.js
@@ -1,12 +1,11 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
/**
- * @constructor
+ * @unrestricted
*/
-WebInspector.ProfileTypeRegistry = function()
-{
+WebInspector.ProfileTypeRegistry = class {
+ constructor() {
this._profileTypes = [];
this.cpuProfileType = new WebInspector.CPUProfileType();
@@ -17,24 +16,21 @@ WebInspector.ProfileTypeRegistry = function()
this._addProfileType(this.trackingHeapSnapshotProfileType);
this.samplingHeapProfileType = new WebInspector.SamplingHeapProfileType();
this._addProfileType(this.samplingHeapProfileType);
-};
+ }
-WebInspector.ProfileTypeRegistry.prototype = {
- /**
- * @param {!WebInspector.ProfileType} profileType
- */
- _addProfileType: function(profileType)
- {
- this._profileTypes.push(profileType);
- },
+ /**
+ * @param {!WebInspector.ProfileType} profileType
+ */
+ _addProfileType(profileType) {
+ this._profileTypes.push(profileType);
+ }
- /**
- * @return {!Array.<!WebInspector.ProfileType>}
- */
- profileTypes: function()
- {
- return this._profileTypes;
- }
+ /**
+ * @return {!Array.<!WebInspector.ProfileType>}
+ */
+ profileTypes() {
+ return this._profileTypes;
+ }
};
WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry();

Powered by Google App Engine
This is Rietveld 408576698