| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * This view displays the Alt-Svc mappings. | 6 * This view displays the Alt-Svc mappings. |
| 7 */ | 7 */ |
| 8 var AltSvcView = (function() { | 8 var AltSvcView = (function() { |
| 9 'use strict'; | 9 'use strict'; |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 cr.addSingletonGetter(AltSvcView); | 35 cr.addSingletonGetter(AltSvcView); |
| 36 | 36 |
| 37 AltSvcView.prototype = { | 37 AltSvcView.prototype = { |
| 38 // Inherit the superclass's methods. | 38 // Inherit the superclass's methods. |
| 39 __proto__: superClass.prototype, | 39 __proto__: superClass.prototype, |
| 40 | 40 |
| 41 onLoadLogFinish: function(data) { | 41 onLoadLogFinish: function(data) { |
| 42 // TODO(rch): Remove the check for spdyAlternateProtocolMappings after | 42 // TODO(rch): Remove the check for spdyAlternateProtocolMappings after |
| 43 // M53 (It was renamed to altSvcMappings in M50). | 43 // M53 (It was renamed to altSvcMappings in M50). |
| 44 return this.onAltSvcMappingsChanged(data.altSvcMappings || | 44 return this.onAltSvcMappingsChanged( |
| 45 data.spdyAlternateProtocolMappings); | 45 data.altSvcMappings || data.spdyAlternateProtocolMappings); |
| 46 }, | 46 }, |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * Displays the alternate service mappings. | 49 * Displays the alternate service mappings. |
| 50 */ | 50 */ |
| 51 onAltSvcMappingsChanged: function(altSvcMappings) { | 51 onAltSvcMappingsChanged: function(altSvcMappings) { |
| 52 if (!altSvcMappings) | 52 if (!altSvcMappings) |
| 53 return false; | 53 return false; |
| 54 var input = new JsEvalContext({altSvcMappings: altSvcMappings}); | 54 var input = new JsEvalContext({altSvcMappings: altSvcMappings}); |
| 55 jstProcess(input, $(AltSvcView.ALTERNATE_PROTOCOL_MAPPINGS_ID)); | 55 jstProcess(input, $(AltSvcView.ALTERNATE_PROTOCOL_MAPPINGS_ID)); |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 return AltSvcView; | 60 return AltSvcView; |
| 61 })(); | 61 })(); |
| OLD | NEW |