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

Side by Side Diff: tracing/tracing/value/value.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 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 unified diff | Download patch
« no previous file with comments | « tracing/tracing/value/unit_test.html ('k') | tracing/tracing/value/value_set.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base/guid.html"> 8 <link rel="import" href="/tracing/base/guid.html">
9 <link rel="import" href="/tracing/base/iteration_helpers.html"> 9 <link rel="import" href="/tracing/base/iteration_helpers.html">
10 <link rel="import" href="/tracing/base/utils.html"> 10 <link rel="import" href="/tracing/base/utils.html">
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (d.numeric === undefined) 119 if (d.numeric === undefined)
120 throw new Error('Expected numeric to be provided'); 120 throw new Error('Expected numeric to be provided');
121 var numeric = tr.v.NumericBase.fromDict(d.numeric); 121 var numeric = tr.v.NumericBase.fromDict(d.numeric);
122 var value = new NumericValue(d.name, numeric, d); 122 var value = new NumericValue(d.name, numeric, d);
123 return value; 123 return value;
124 }; 124 };
125 125
126 NumericValue.prototype = { 126 NumericValue.prototype = {
127 __proto__: Value.prototype, 127 __proto__: Value.prototype,
128 128
129 merge: function(other) {
130 if (!(other instanceof NumericValue))
131 throw new Error('Merging non-NumericValues is not supported');
132
133 var numeric = this.numeric.merge(other.numeric);
134 var result = new NumericValue(this.name, numeric);
135 // TODO(eakuefner): merge diagnostics?
136 return result;
137 },
138
129 asDictInto_: function(d) { 139 asDictInto_: function(d) {
130 d.type = 'numeric'; 140 d.type = 'numeric';
131 d.numeric = this.numeric.asDict(); 141 d.numeric = this.numeric.asDict();
132 } 142 }
133 }; 143 };
134 144
135 /** @constructor */ 145 /** @constructor */
136 function DictValue(name, value, opt_options) { 146 function DictValue(name, value, opt_options) {
137 Value.call(this, name, opt_options); 147 Value.call(this, name, opt_options);
138 this.value = value; 148 this.value = value;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 233
224 return { 234 return {
225 Value: Value, 235 Value: Value,
226 NumericValue: NumericValue, 236 NumericValue: NumericValue,
227 DictValue: DictValue, 237 DictValue: DictValue,
228 FailureValue: FailureValue, 238 FailureValue: FailureValue,
229 SkipValue: SkipValue 239 SkipValue: SkipValue
230 }; 240 };
231 }); 241 });
232 </script> 242 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/unit_test.html ('k') | tracing/tracing/value/value_set.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698