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

Side by Side Diff: third_party/WebKit/Source/core/loader/LinkLoader.cpp

Issue 2776453002: Remove spurious condition from LinkLoader::getResourceTypeFromAsAttribute (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } else if (as == "style") { 194 } else if (as == "style") {
195 return Resource::kCSSStyleSheet; 195 return Resource::kCSSStyleSheet;
196 } else if (as == "video") { 196 } else if (as == "video") {
197 return Resource::kMedia; 197 return Resource::kMedia;
198 } else if (as == "audio") { 198 } else if (as == "audio") {
199 return Resource::kMedia; 199 return Resource::kMedia;
200 } else if (as == "track") { 200 } else if (as == "track") {
201 return Resource::kTextTrack; 201 return Resource::kTextTrack;
202 } else if (as == "font") { 202 } else if (as == "font") {
203 return Resource::kFont; 203 return Resource::kFont;
204 } else if (as == "track") {
205 return Resource::kTextTrack;
206 } else if (as.IsEmpty()) { 204 } else if (as.IsEmpty()) {
207 return Resource::kRaw; 205 return Resource::kRaw;
208 } 206 }
209 return WTF::kNullopt; 207 return WTF::kNullopt;
210 } 208 }
211 209
212 Resource* LinkLoader::LinkPreloadedResourceForTesting() { 210 Resource* LinkLoader::LinkPreloadedResourceForTesting() {
213 return link_preload_resource_client_ 211 return link_preload_resource_client_
214 ? link_preload_resource_client_->GetResource() 212 ? link_preload_resource_client_->GetResource()
215 : nullptr; 213 : nullptr;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 496
499 DEFINE_TRACE(LinkLoader) { 497 DEFINE_TRACE(LinkLoader) {
500 visitor->Trace(client_); 498 visitor->Trace(client_);
501 visitor->Trace(prerender_); 499 visitor->Trace(prerender_);
502 visitor->Trace(link_preload_resource_client_); 500 visitor->Trace(link_preload_resource_client_);
503 ResourceOwner<Resource, ResourceClient>::Trace(visitor); 501 ResourceOwner<Resource, ResourceClient>::Trace(visitor);
504 PrerenderClient::Trace(visitor); 502 PrerenderClient::Trace(visitor);
505 } 503 }
506 504
507 } // namespace blink 505 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698