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

Side by Side Diff: Source/devtools/front_end/network/RequestView.js

Issue 344443003: DevTools: Code fixes for the Closure compiler roll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 hasContent: function() 49 hasContent: function()
50 { 50 {
51 return false; 51 return false;
52 }, 52 },
53 53
54 __proto__: WebInspector.VBox.prototype 54 __proto__: WebInspector.VBox.prototype
55 } 55 }
56 56
57 /** 57 /**
58 * @param {!WebInspector.NetworkRequest} request 58 * @param {!WebInspector.NetworkRequest} request
59 * @return {boolean}
59 */ 60 */
60 WebInspector.RequestView.hasTextContent = function(request) 61 WebInspector.RequestView.hasTextContent = function(request)
61 { 62 {
62 if (request.type.isTextType()) 63 if (request.type.isTextType())
63 return true; 64 return true;
64 if (request.type === WebInspector.resourceTypes.Other || request.hasErrorSta tusCode()) 65 if (request.type === WebInspector.resourceTypes.Other || request.hasErrorSta tusCode())
65 return request.content && !request.contentEncoded; 66 return !!request.content && !request.contentEncoded;
66 return false; 67 return false;
67 } 68 }
68 69
69 /** 70 /**
70 * @param {!WebInspector.NetworkRequest} request 71 * @param {!WebInspector.NetworkRequest} request
72 * @return {!WebInspector.View}
71 */ 73 */
72 WebInspector.RequestView.nonSourceViewForRequest = function(request) 74 WebInspector.RequestView.nonSourceViewForRequest = function(request)
73 { 75 {
74 switch (request.type) { 76 switch (request.type) {
75 case WebInspector.resourceTypes.Image: 77 case WebInspector.resourceTypes.Image:
76 return new WebInspector.ImageView(request); 78 return new WebInspector.ImageView(request);
77 case WebInspector.resourceTypes.Font: 79 case WebInspector.resourceTypes.Font:
78 return new WebInspector.FontView(request); 80 return new WebInspector.FontView(request);
79 default: 81 default:
80 return new WebInspector.RequestView(request); 82 return new WebInspector.RequestView(request);
81 } 83 }
82 } 84 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/network/RequestJSONView.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698