| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * Class for enabling experimental features. | 7 * Class for enabling experimental features. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
| 13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
| 14 | 14 |
| 15 (function() { | 15 (function() { |
| 16 | 16 |
| 17 var kExperimentsStorageName = 'remoting-experiments'; | 17 var kExperimentsStorageName = 'remoting-experiments'; |
| 18 var ACTIVE_FIELD_TRIALS = {'ChromotingQUIC': 'quic', 'ChromotingVP9': 'vp9'}; | 18 var ACTIVE_FIELD_TRIALS = {'ChromotingVP9': 'vp9'}; |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * @param {Array.<string>} list | 21 * @param {Array.<string>} list |
| 22 */ | 22 */ |
| 23 function save(list) { | 23 function save(list) { |
| 24 var storageMap = {}; | 24 var storageMap = {}; |
| 25 storageMap[kExperimentsStorageName] = list; | 25 storageMap[kExperimentsStorageName] = list; |
| 26 chrome.storage.local.set(storageMap); | 26 chrome.storage.local.set(storageMap); |
| 27 }; | 27 }; |
| 28 | 28 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 for (var i = 0; i < trialNames.length; ++i) { | 104 for (var i = 0; i < trialNames.length; ++i) { |
| 105 if (results[i + 1]) { | 105 if (results[i + 1]) { |
| 106 list.push(ACTIVE_FIELD_TRIALS[trialNames[i]]); | 106 list.push(ACTIVE_FIELD_TRIALS[trialNames[i]]); |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 return list; | 109 return list; |
| 110 }); | 110 }); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 })(); | 113 })(); |
| OLD | NEW |