| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 var mainResourceURL = target.inspectedURL(); | 65 var mainResourceURL = target.inspectedURL(); |
| 66 var categoriesDone = 0; | 66 var categoriesDone = 0; |
| 67 | 67 |
| 68 function categoryDoneCallback() { | 68 function categoryDoneCallback() { |
| 69 if (++categoriesDone !== categories.length) | 69 if (++categoriesDone !== categories.length) |
| 70 return; | 70 return; |
| 71 resultCallback(mainResourceURL, results); | 71 resultCallback(mainResourceURL, results); |
| 72 } | 72 } |
| 73 | 73 |
| 74 var networkManager = target.model(SDK.NetworkManager); | 74 var networkManager = target.model(SDK.NetworkManager); |
| 75 var requests = networkManager ? NetworkLog.networkLog.requestsForManager(net
workManager).slice() : []; | 75 var requests = NetworkLog.networkLog.requests().filter( |
| 76 request => SDK.NetworkManager.managerForRequest(request) === networkMana
ger); |
| 77 |
| 76 var compositeProgress = new Common.CompositeProgress(this._progress); | 78 var compositeProgress = new Common.CompositeProgress(this._progress); |
| 77 var subprogresses = []; | 79 var subprogresses = []; |
| 78 for (var i = 0; i < categories.length; ++i) | 80 for (var i = 0; i < categories.length; ++i) |
| 79 subprogresses.push(new Common.ProgressProxy(compositeProgress.createSubPro
gress(), categoryDoneCallback)); | 81 subprogresses.push(new Common.ProgressProxy(compositeProgress.createSubPro
gress(), categoryDoneCallback)); |
| 80 for (var i = 0; i < categories.length; ++i) { | 82 for (var i = 0; i < categories.length; ++i) { |
| 81 if (this._progress.isCanceled()) { | 83 if (this._progress.isCanceled()) { |
| 82 subprogresses[i].done(); | 84 subprogresses[i].done(); |
| 83 continue; | 85 continue; |
| 84 } | 86 } |
| 85 var category = categories[i]; | 87 var category = categories[i]; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 var callback = this._pageReloadCallback; | 163 var callback = this._pageReloadCallback; |
| 162 delete this._pageReloadCallback; | 164 delete this._pageReloadCallback; |
| 163 callback(); | 165 callback(); |
| 164 } | 166 } |
| 165 } | 167 } |
| 166 | 168 |
| 167 clearResults() { | 169 clearResults() { |
| 168 this._auditsPanel.clearResults(); | 170 this._auditsPanel.clearResults(); |
| 169 } | 171 } |
| 170 }; | 172 }; |
| OLD | NEW |