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

Side by Side Diff: Source/core/html/LinkRelAttribute.cpp

Issue 16294006: Remove duplicated else if "dns-prefetch" branch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 else if (equalIgnoringCase(rel, "apple-touch-icon")) 64 else if (equalIgnoringCase(rel, "apple-touch-icon"))
65 m_iconType = TouchIcon; 65 m_iconType = TouchIcon;
66 else if (equalIgnoringCase(rel, "apple-touch-icon-precomposed")) 66 else if (equalIgnoringCase(rel, "apple-touch-icon-precomposed"))
67 m_iconType = TouchPrecomposedIcon; 67 m_iconType = TouchPrecomposedIcon;
68 #endif 68 #endif
69 else if (equalIgnoringCase(rel, "dns-prefetch")) 69 else if (equalIgnoringCase(rel, "dns-prefetch"))
70 m_isDNSPrefetch = true; 70 m_isDNSPrefetch = true;
71 else if (equalIgnoringCase(rel, "alternate stylesheet") || equalIgnoringCase (rel, "stylesheet alternate")) { 71 else if (equalIgnoringCase(rel, "alternate stylesheet") || equalIgnoringCase (rel, "stylesheet alternate")) {
72 m_isStyleSheet = true; 72 m_isStyleSheet = true;
73 m_isAlternate = true; 73 m_isAlternate = true;
74 } else if (equalIgnoringCase(rel, "dns-prefetch")) {
75 m_isDNSPrefetch = true;
76 } else if (equalIgnoringCase(rel, "import")) { 74 } else if (equalIgnoringCase(rel, "import")) {
77 m_isImport = true; 75 m_isImport = true;
78 } else { 76 } else {
79 // Tokenize the rel attribute and set bits based on specific keywords th at we find. 77 // Tokenize the rel attribute and set bits based on specific keywords th at we find.
80 String relCopy = rel; 78 String relCopy = rel;
81 relCopy.replace('\n', ' '); 79 relCopy.replace('\n', ' ');
82 Vector<String> list; 80 Vector<String> list;
83 relCopy.split(' ', list); 81 relCopy.split(' ', list);
84 Vector<String>::const_iterator end = list.end(); 82 Vector<String>::const_iterator end = list.end();
85 for (Vector<String>::const_iterator it = list.begin(); it != end; ++it) { 83 for (Vector<String>::const_iterator it = list.begin(); it != end; ++it) {
(...skipping 13 matching lines...) Expand all
99 m_isLinkPrefetch = true; 97 m_isLinkPrefetch = true;
100 else if (equalIgnoringCase(*it, "subresource")) 98 else if (equalIgnoringCase(*it, "subresource"))
101 m_isLinkSubresource = true; 99 m_isLinkSubresource = true;
102 else if (equalIgnoringCase(*it, "prerender")) 100 else if (equalIgnoringCase(*it, "prerender"))
103 m_isLinkPrerender = true; 101 m_isLinkPrerender = true;
104 } 102 }
105 } 103 }
106 } 104 }
107 105
108 } 106 }
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