| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 class provides a "bridge" for communicating between the javascript and | 6 * This class provides a "bridge" for communicating between the javascript and |
| 7 * the browser. | 7 * the browser. |
| 8 */ | 8 */ |
| 9 var BrowserBridge = (function() { | 9 var BrowserBridge = (function() { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 }, | 141 }, |
| 142 | 142 |
| 143 sendClearBadProxies: function() { | 143 sendClearBadProxies: function() { |
| 144 this.send('clearBadProxies'); | 144 this.send('clearBadProxies'); |
| 145 }, | 145 }, |
| 146 | 146 |
| 147 sendClearHostResolverCache: function() { | 147 sendClearHostResolverCache: function() { |
| 148 this.send('clearHostResolverCache'); | 148 this.send('clearHostResolverCache'); |
| 149 }, | 149 }, |
| 150 | 150 |
| 151 sendClearBrowserCache: function() { |
| 152 this.send('clearBrowserCache'); |
| 153 }, |
| 154 |
| 151 sendStartConnectionTests: function(url) { | 155 sendStartConnectionTests: function(url) { |
| 152 this.send('startConnectionTests', [url]); | 156 this.send('startConnectionTests', [url]); |
| 153 }, | 157 }, |
| 154 | 158 |
| 155 sendHSTSQuery: function(domain) { | 159 sendHSTSQuery: function(domain) { |
| 156 this.send('hstsQuery', [domain]); | 160 this.send('hstsQuery', [domain]); |
| 157 }, | 161 }, |
| 158 | 162 |
| 159 sendHSTSAdd: function(domain, include_subdomains, pins) { | 163 sendHSTSAdd: function(domain, include_subdomains, pins) { |
| 160 this.send('hstsAdd', [domain, include_subdomains, pins]); | 164 this.send('hstsAdd', [domain, include_subdomains, pins]); |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 helper.removeObserver(this); | 668 helper.removeObserver(this); |
| 665 --this.observingCount_; | 669 --this.observingCount_; |
| 666 this.updatedData_[name] = data; | 670 this.updatedData_[name] = data; |
| 667 if (this.observingCount_ == 0) | 671 if (this.observingCount_ == 0) |
| 668 this.callback_(this.updatedData_); | 672 this.callback_(this.updatedData_); |
| 669 } | 673 } |
| 670 }; | 674 }; |
| 671 | 675 |
| 672 return BrowserBridge; | 676 return BrowserBridge; |
| 673 })(); | 677 })(); |
| OLD | NEW |