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

Unified Diff: tracing/tracing/value/diagnostics/device_info.html

Issue 2988823002: DeviceInfo into GenericSets (Closed)
Patch Set: Remove how-to-write-metrics-device image Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/value/diagnostics/device_info.html
diff --git a/tracing/tracing/value/diagnostics/device_info.html b/tracing/tracing/value/diagnostics/device_info.html
deleted file mode 100644
index 24034081aac2b45ceb568e74f7e52f5fefd5e685..0000000000000000000000000000000000000000
--- a/tracing/tracing/value/diagnostics/device_info.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 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.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class DeviceInfo extends tr.v.d.Diagnostic {
- constructor(opt_info) {
- super();
-
- const info = opt_info || {};
- this.chromeVersion_ = info.chromeVersion || '';
- this.osName_ = info.osName || '';
- this.osVersion_ = info.osVersion || '';
- this.gpuInfo_ = info.gpuInfo || undefined;
- this.arch_ = info.arch || undefined;
- this.ram_ = info.ram || 0;
- }
-
- addToHistogram(hist) {
- hist.diagnostics.set(tr.v.d.RESERVED_NAMES.DEVICE, this);
- }
-
- /**
- * @param {!tr.v.Histogram} hist
- * @return {(undefined|!tr.v.d.DeviceInfo)}
- */
- static getFromHistogram(hist) {
- return hist.diagnostics.get(tr.v.d.RESERVED_NAMES.DEVICE);
- }
-
- clone() {
- const clone = new tr.v.d.MergedDeviceInfo();
- clone.addDiagnostic(this);
- return clone;
- }
-
- asDictInto_(d) {
- d.chromeVersion = this.chromeVersion;
- d.osName = this.osName;
- d.osVersion = this.osVersion;
- d.gpuInfo = this.gpuInfo;
- d.arch = this.arch;
- d.ram = this.ram;
- }
-
- static fromDict(d) {
- return new DeviceInfo(d);
- }
-
- get chromeVersion() {
- return this.chromeVersion_;
- }
-
- get osName() {
- return this.osName_;
- }
-
- get osVersion() {
- return this.osVersion_;
- }
-
- get gpuInfo() {
- return this.gpuInfo_;
- }
-
- get arch() {
- return this.arch_;
- }
-
- get ram() {
- return this.ram_;
- }
- }
-
- tr.v.d.Diagnostic.register(DeviceInfo, {
- elementName: 'tr-v-ui-device-info-span'
- });
-
- return {
- DeviceInfo,
- };
-});
-</script>
« no previous file with comments | « tracing/tracing/value/diagnostics/all_diagnostics.html ('k') | tracing/tracing/value/diagnostics/merged_device_info.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698