| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 var results = []; | 63 var results = []; |
| 64 var mainResourceURL = target.inspectedURL(); | 64 var mainResourceURL = target.inspectedURL(); |
| 65 var categoriesDone = 0; | 65 var categoriesDone = 0; |
| 66 | 66 |
| 67 function categoryDoneCallback() { | 67 function categoryDoneCallback() { |
| 68 if (++categoriesDone !== categories.length) | 68 if (++categoriesDone !== categories.length) |
| 69 return; | 69 return; |
| 70 resultCallback(mainResourceURL, results); | 70 resultCallback(mainResourceURL, results); |
| 71 } | 71 } |
| 72 | 72 |
| 73 var requests = SDK.networkLog.requestsForTarget(target).slice(); | 73 var requests = NetworkLog.networkLog.requestsForTarget(target).slice(); |
| 74 var compositeProgress = new Common.CompositeProgress(this._progress); | 74 var compositeProgress = new Common.CompositeProgress(this._progress); |
| 75 var subprogresses = []; | 75 var subprogresses = []; |
| 76 for (var i = 0; i < categories.length; ++i) | 76 for (var i = 0; i < categories.length; ++i) |
| 77 subprogresses.push(new Common.ProgressProxy(compositeProgress.createSubPro
gress(), categoryDoneCallback)); | 77 subprogresses.push(new Common.ProgressProxy(compositeProgress.createSubPro
gress(), categoryDoneCallback)); |
| 78 for (var i = 0; i < categories.length; ++i) { | 78 for (var i = 0; i < categories.length; ++i) { |
| 79 if (this._progress.isCanceled()) { | 79 if (this._progress.isCanceled()) { |
| 80 subprogresses[i].done(); | 80 subprogresses[i].done(); |
| 81 continue; | 81 continue; |
| 82 } | 82 } |
| 83 var category = categories[i]; | 83 var category = categories[i]; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 var callback = this._pageReloadCallback; | 154 var callback = this._pageReloadCallback; |
| 155 delete this._pageReloadCallback; | 155 delete this._pageReloadCallback; |
| 156 callback(); | 156 callback(); |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 clearResults() { | 160 clearResults() { |
| 161 this._auditsPanel.clearResults(); | 161 this._auditsPanel.clearResults(); |
| 162 } | 162 } |
| 163 }; | 163 }; |
| OLD | NEW |