Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/audits/AuditController.js

Issue 2109813003: [DevTools] No NetworkManager and NetworkLog for v8only mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing code review comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 var mainResourceURL = target.resourceTreeModel.inspectedPageURL(); 64 var mainResourceURL = target.resourceTreeModel.inspectedPageURL();
65 var categoriesDone = 0; 65 var categoriesDone = 0;
66 66
67 function categoryDoneCallback() 67 function categoryDoneCallback()
68 { 68 {
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 requests = target.networkLog.requests().slice(); 74 var networkLog = WebInspector.NetworkLog.fromTarget(target);
75 var requests = networkLog ? networkLog.requests().slice() : [];
75 var compositeProgress = new WebInspector.CompositeProgress(this._progres s); 76 var compositeProgress = new WebInspector.CompositeProgress(this._progres s);
76 var subprogresses = []; 77 var subprogresses = [];
77 for (var i = 0; i < categories.length; ++i) 78 for (var i = 0; i < categories.length; ++i)
78 subprogresses.push(new WebInspector.ProgressProxy(compositeProgress. createSubProgress(), categoryDoneCallback)); 79 subprogresses.push(new WebInspector.ProgressProxy(compositeProgress. createSubProgress(), categoryDoneCallback));
79 for (var i = 0; i < categories.length; ++i) { 80 for (var i = 0; i < categories.length; ++i) {
80 if (this._progress.isCanceled()) { 81 if (this._progress.isCanceled()) {
81 subprogresses[i].done(); 82 subprogresses[i].done();
82 continue; 83 continue;
83 } 84 }
84 var category = categories[i]; 85 var category = categories[i];
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 delete this._pageReloadCallback; 163 delete this._pageReloadCallback;
163 callback(); 164 callback();
164 } 165 }
165 }, 166 },
166 167
167 clearResults: function() 168 clearResults: function()
168 { 169 {
169 this._auditsPanel.clearResults(); 170 this._auditsPanel.clearResults();
170 } 171 }
171 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698