1<!DOCTYPE html> 2<!-- 3Copyright (c) 2016 The Chromium Authors. All rights reserved. 4Use of this source code is governed by a BSD-style license that can be 5found in the LICENSE file. 6--> 7 8<link rel="import" href="/tracing/base/base.html"> 9<link rel="import" href="/tracing/model/constants.html"> 10 11<script> 12'use strict'; 13 14tr.exportTo('tr.model', function() { 15 function ScopedId(scope, id) { 16 if (scope === undefined) { 17 throw new Error('Scope should be defined. Use \'' + 18 tr.model.OBJECT_DEFAULT_SCOPE + 19 '\' as the default scope.'); 20 } 21 this.scope = scope; 22 this.id = id; 23 } 24 25 ScopedId.prototype = { 26 toString: function() { 27 return '{scope: ' + this.scope + ', id: ' + this.id + '}'; 28 } 29 }; 30 31 return { 32 ScopedId: ScopedId 33 }; 34}); 35</script> 36