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

Side by Side Diff: Source/weborigin/KURL.cpp

Issue 20135002: Optimize WebURL -> GURL conversions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 5 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 | « Source/weborigin/KURL.h ('k') | public/platform/WebURL.h » ('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) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 init(base, relative, 0); 199 init(base, relative, 0);
200 } 200 }
201 201
202 // Constructs a new URL given a base URL and a possibly relative input URL. 202 // Constructs a new URL given a base URL and a possibly relative input URL.
203 // Any query portion of the relative URL will be encoded in the given encoding. 203 // Any query portion of the relative URL will be encoded in the given encoding.
204 KURL::KURL(const KURL& base, const String& relative, const WTF::TextEncoding& en coding) 204 KURL::KURL(const KURL& base, const String& relative, const WTF::TextEncoding& en coding)
205 { 205 {
206 init(base, relative, &encoding.encodingForFormSubmission()); 206 init(base, relative, &encoding.encodingForFormSubmission());
207 } 207 }
208 208
209 KURL::KURL(const CString& canonicalSpec, const url_parse::Parsed& parsed, bool i sValid) 209 KURL::KURL(const AtomicString& canonicalString, const url_parse::Parsed& parsed, bool isValid)
210 : m_isValid(isValid) 210 : m_isValid(isValid)
211 , m_protocolIsInHTTPFamily(false) 211 , m_protocolIsInHTTPFamily(false)
212 , m_parsed(parsed) 212 , m_parsed(parsed)
213 , m_string(AtomicString::fromUTF8(canonicalSpec.data(), canonicalSpec.length ())) 213 , m_string(canonicalString)
214 { 214 {
215 initProtocolIsInHTTPFamily(); 215 initProtocolIsInHTTPFamily();
216 initInnerURL(); 216 initInnerURL();
217 } 217 }
218 218
219 KURL::KURL(WTF::HashTableDeletedValueType) 219 KURL::KURL(WTF::HashTableDeletedValueType)
220 : m_isValid(false) 220 : m_isValid(false)
221 , m_protocolIsInHTTPFamily(false) 221 , m_protocolIsInHTTPFamily(false)
222 , m_string(WTF::HashTableDeletedValue) 222 , m_string(WTF::HashTableDeletedValue)
223 { 223 {
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 m_string = AtomicString::fromUTF8(output.data(), output.length()); 837 m_string = AtomicString::fromUTF8(output.data(), output.length());
838 } 838 }
839 839
840 bool KURL::isSafeToSendToAnotherThread() const 840 bool KURL::isSafeToSendToAnotherThread() const
841 { 841 {
842 return m_string.isSafeToSendToAnotherThread() 842 return m_string.isSafeToSendToAnotherThread()
843 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 843 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
844 } 844 }
845 845
846 } // namespace WebCore 846 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/weborigin/KURL.h ('k') | public/platform/WebURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698