| 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 * HSTS is HTTPS Strict Transport Security: a way for sites to elect to always | 6 * HSTS is HTTPS Strict Transport Security: a way for sites to elect to always |
| 7 * use HTTPS. See http://dev.chromium.org/sts | 7 * use HTTPS. See http://dev.chromium.org/sts |
| 8 * | 8 * |
| 9 * This UI allows a user to query and update the browser's list of HSTS domains. | 9 * This UI allows a user to query and update the browser's list of HSTS domains. |
| 10 * It also allows users to query and update the browser's list of public key | 10 * It also allows users to query and update the browser's list of public key |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 this.queryOutputDiv_.innerHTML = '<b>Not found</b>'; | 111 this.queryOutputDiv_.innerHTML = '<b>Not found</b>'; |
| 112 yellowFade(this.queryOutputDiv_); | 112 yellowFade(this.queryOutputDiv_); |
| 113 return; | 113 return; |
| 114 } | 114 } |
| 115 | 115 |
| 116 this.queryOutputDiv_.innerHTML = ''; | 116 this.queryOutputDiv_.innerHTML = ''; |
| 117 | 117 |
| 118 var s = addNode(this.queryOutputDiv_, 'span'); | 118 var s = addNode(this.queryOutputDiv_, 'span'); |
| 119 s.innerHTML = '<b>Found</b>: mode: '; | 119 s.innerHTML = '<b>Found</b>: mode: '; |
| 120 | 120 |
| 121 // TODO(palmer): Combine these 2-line pairs into 1: |
| 122 // addNodeWithText(this.queryOutputDiv_, 'tt', results.sts_observed); |
| 121 var t = addNode(this.queryOutputDiv_, 'tt'); | 123 var t = addNode(this.queryOutputDiv_, 'tt'); |
| 122 t.textContent = modeToString(result.mode); | 124 t.textContent = modeToString(result.mode); |
| 123 | 125 |
| 124 addTextNode(this.queryOutputDiv_, ' sts_include_subdomains:'); | 126 addTextNode(this.queryOutputDiv_, ' sts_include_subdomains:'); |
| 125 | 127 |
| 126 t = addNode(this.queryOutputDiv_, 'tt'); | 128 t = addNode(this.queryOutputDiv_, 'tt'); |
| 127 t.textContent = result.sts_subdomains; | 129 t.textContent = result.sts_subdomains; |
| 128 | 130 |
| 129 addTextNode(this.queryOutputDiv_, ' pkp_include_subdomains:'); | 131 addTextNode(this.queryOutputDiv_, ' pkp_include_subdomains:'); |
| 130 | 132 |
| 131 t = addNode(this.queryOutputDiv_, 'tt'); | 133 t = addNode(this.queryOutputDiv_, 'tt'); |
| 132 t.textContent = result.pkp_subdomains; | 134 t.textContent = result.pkp_subdomains; |
| 133 | 135 |
| 136 addTextNode(this.queryOutputDiv_, ' sts_observed:'); |
| 137 |
| 138 t = addNode(this.queryOutputDiv_, 'tt'); |
| 139 t.textContent = result.sts_observed; |
| 140 |
| 141 addTextNode(this.queryOutputDiv_, ' pkp_observed:'); |
| 142 |
| 143 t = addNode(this.queryOutputDiv_, 'tt'); |
| 144 t.textContent = result.pkp_observed; |
| 145 |
| 134 addTextNode(this.queryOutputDiv_, ' domain:'); | 146 addTextNode(this.queryOutputDiv_, ' domain:'); |
| 135 | 147 |
| 136 t = addNode(this.queryOutputDiv_, 'tt'); | 148 t = addNode(this.queryOutputDiv_, 'tt'); |
| 137 t.textContent = result.domain; | 149 t.textContent = result.domain; |
| 138 | 150 |
| 139 addTextNode(this.queryOutputDiv_, ' pubkey_hashes:'); | 151 addTextNode(this.queryOutputDiv_, ' pubkey_hashes:'); |
| 140 | 152 |
| 141 t = addNode(this.queryOutputDiv_, 'tt'); | 153 t = addNode(this.queryOutputDiv_, 'tt'); |
| 142 | 154 |
| 143 // |public_key_hashes| is an old synonym for what is now | 155 // |public_key_hashes| is an old synonym for what is now |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 element.style.webkitTransitionDuration = '0'; | 197 element.style.webkitTransitionDuration = '0'; |
| 186 element.style.backgroundColor = '#fffccf'; | 198 element.style.backgroundColor = '#fffccf'; |
| 187 setTimeout(function() { | 199 setTimeout(function() { |
| 188 element.style.webkitTransitionDuration = '1000ms'; | 200 element.style.webkitTransitionDuration = '1000ms'; |
| 189 element.style.backgroundColor = '#fff'; | 201 element.style.backgroundColor = '#fff'; |
| 190 }, 0); | 202 }, 0); |
| 191 } | 203 } |
| 192 | 204 |
| 193 return HSTSView; | 205 return HSTSView; |
| 194 })(); | 206 })(); |
| OLD | NEW |