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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/KURL.h

Issue 2644633006: Add KURL::protocolIsJavascript member function (Closed)
Patch Set: Created 3 years, 11 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) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool hasFragmentIdentifier() const; 135 bool hasFragmentIdentifier() const;
136 136
137 String baseAsString() const; 137 String baseAsString() const;
138 138
139 // Returns true if the current URL's protocol is the same as the null- 139 // Returns true if the current URL's protocol is the same as the null-
140 // terminated ASCII argument. The argument must be lower-case. 140 // terminated ASCII argument. The argument must be lower-case.
141 bool protocolIs(const char*) const; 141 bool protocolIs(const char*) const;
142 bool protocolIsData() const { return protocolIs("data"); } 142 bool protocolIsData() const { return protocolIs("data"); }
143 // This includes at least about:blank and about:srcdoc. 143 // This includes at least about:blank and about:srcdoc.
144 bool protocolIsAbout() const { return protocolIs("about"); } 144 bool protocolIsAbout() const { return protocolIs("about"); }
145 bool protocolIsJavaScript() const;
145 bool protocolIsInHTTPFamily() const; 146 bool protocolIsInHTTPFamily() const;
146 bool isLocalFile() const; 147 bool isLocalFile() const;
147 bool isAboutBlankURL() const; // Is exactly about:blank. 148 bool isAboutBlankURL() const; // Is exactly about:blank.
148 bool isAboutSrcdocURL() const; // Is exactly about:srcdoc. 149 bool isAboutSrcdocURL() const; // Is exactly about:srcdoc.
149 150
150 bool setProtocol(const String&); 151 bool setProtocol(const String&);
151 void setHost(const String&); 152 void setHost(const String&);
152 153
153 void removePort(); 154 void removePort();
154 void setPort(unsigned short); 155 void setPort(unsigned short);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 291
291 // KURLHash is the default hash for String 292 // KURLHash is the default hash for String
292 template <> 293 template <>
293 struct DefaultHash<blink::KURL> { 294 struct DefaultHash<blink::KURL> {
294 typedef blink::KURLHash Hash; 295 typedef blink::KURLHash Hash;
295 }; 296 };
296 297
297 } // namespace WTF 298 } // namespace WTF
298 299
299 #endif // KURL_h 300 #endif // KURL_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.cpp ('k') | third_party/WebKit/Source/platform/weborigin/KURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698