| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * @return {!Iterable.<!WebInspector.ServiceWorker>} | 86 * @return {!Iterable.<!WebInspector.ServiceWorker>} |
| 87 */ | 87 */ |
| 88 workers: function() | 88 workers: function() |
| 89 { | 89 { |
| 90 return this._workers.values(); | 90 return this._workers.values(); |
| 91 }, | 91 }, |
| 92 | 92 |
| 93 /** | 93 /** |
| 94 * @param {string} versionId |
| 95 * @return {boolean} |
| 96 */ |
| 97 hasWorkerWithVersionId: function(versionId) |
| 98 { |
| 99 for (var pair of this._workers) { |
| 100 if (pair[1]._versionId === versionId) |
| 101 return true; |
| 102 } |
| 103 return false; |
| 104 }, |
| 105 |
| 106 /** |
| 94 * @return {boolean} | 107 * @return {boolean} |
| 95 */ | 108 */ |
| 96 hasWorkers: function() | 109 hasWorkers: function() |
| 97 { | 110 { |
| 98 return !!this._workers.size; | 111 return !!this._workers.size; |
| 99 }, | 112 }, |
| 100 | 113 |
| 101 /** | 114 /** |
| 102 * @return {!Map.<string, !WebInspector.ServiceWorkerRegistration>} | 115 * @return {!Map.<string, !WebInspector.ServiceWorkerRegistration>} |
| 103 */ | 116 */ |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 }, | 873 }, |
| 861 | 874 |
| 862 /** | 875 /** |
| 863 * @return {boolean} | 876 * @return {boolean} |
| 864 */ | 877 */ |
| 865 _shouldBeRemoved: function() | 878 _shouldBeRemoved: function() |
| 866 { | 879 { |
| 867 return this._isRedundant() && (!this._hasErrorLog() || this._deleting); | 880 return this._isRedundant() && (!this._hasErrorLog() || this._deleting); |
| 868 } | 881 } |
| 869 } | 882 } |
| OLD | NEW |