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

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

Issue 235063003: Get rid of code duplication in LinkRelAttribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more silly Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/LinkRelAttribute.cpp » ('j') | 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 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * 29 *
30 */ 30 */
31 31
32 #ifndef LinkRelAttribute_h 32 #ifndef LinkRelAttribute_h
33 #define LinkRelAttribute_h 33 #define LinkRelAttribute_h
34 34
35 #include "core/dom/IconURL.h" 35 #include "core/dom/IconURL.h"
36 36 #include "wtf/text/WTFString.h"
37 namespace WTF {
38 class String;
39 }
40 37
41 namespace WebCore { 38 namespace WebCore {
42 39
43 class LinkRelAttribute { 40 class LinkRelAttribute {
44 public: 41 public:
45 LinkRelAttribute(); 42 explicit LinkRelAttribute(const String& = "");
46 explicit LinkRelAttribute(const String&);
47 43
48 bool isStyleSheet() const { return m_isStyleSheet; } 44 bool isStyleSheet() const { return m_isStyleSheet; }
49 IconType iconType() const { return m_iconType; } 45 IconType iconType() const { return m_iconType; }
50 bool isAlternate() const { return m_isAlternate; } 46 bool isAlternate() const { return m_isAlternate; }
51 bool isDNSPrefetch() const { return m_isDNSPrefetch; } 47 bool isDNSPrefetch() const { return m_isDNSPrefetch; }
52 bool isLinkPrefetch() const { return m_isLinkPrefetch; } 48 bool isLinkPrefetch() const { return m_isLinkPrefetch; }
53 bool isLinkSubresource() const { return m_isLinkSubresource; } 49 bool isLinkSubresource() const { return m_isLinkSubresource; }
54 bool isLinkPrerender() const { return m_isLinkPrerender; } 50 bool isLinkPrerender() const { return m_isLinkPrerender; }
55 bool isLinkNext() const { return m_isLinkNext; } 51 bool isLinkNext() const { return m_isLinkNext; }
56 bool isImport() const { return m_isImport; } 52 bool isImport() const { return m_isImport; }
57 53
58 private: 54 private:
59 IconType m_iconType; 55 IconType m_iconType;
60 bool m_isStyleSheet : 1; 56 bool m_isStyleSheet : 1;
61 bool m_isAlternate : 1; 57 bool m_isAlternate : 1;
62 bool m_isDNSPrefetch : 1; 58 bool m_isDNSPrefetch : 1;
63 bool m_isLinkPrefetch : 1; 59 bool m_isLinkPrefetch : 1;
64 bool m_isLinkSubresource : 1; 60 bool m_isLinkSubresource : 1;
65 bool m_isLinkPrerender : 1; 61 bool m_isLinkPrerender : 1;
66 bool m_isLinkNext : 1; 62 bool m_isLinkNext : 1;
67 bool m_isImport : 1; 63 bool m_isImport : 1;
68 }; 64 };
69 65
70 } 66 }
71 67
72 #endif 68 #endif
73 69
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/LinkRelAttribute.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698