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

Side by Side Diff: Source/WebCore/platform/KURLGoogle.cpp

Issue 7867002: Merge 94821 - [chromium] KURL::copy doesn't produce something usable on another thread. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2011 Google Inc. 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 void KURLGooglePrivate::copyTo(KURLGooglePrivate* dest) const 277 void KURLGooglePrivate::copyTo(KURLGooglePrivate* dest) const
278 { 278 {
279 dest->m_isValid = m_isValid; 279 dest->m_isValid = m_isValid;
280 dest->m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily; 280 dest->m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily;
281 dest->m_parsed = m_parsed; 281 dest->m_parsed = m_parsed;
282 282
283 // Don't copy the 16-bit string since that will be regenerated as needed. 283 // Don't copy the 16-bit string since that will be regenerated as needed.
284 dest->m_utf8 = CString(m_utf8.data(), m_utf8.length()); 284 dest->m_utf8 = CString(m_utf8.data(), m_utf8.length());
285 dest->m_utf8IsASCII = m_utf8IsASCII; 285 dest->m_utf8IsASCII = m_utf8IsASCII;
286 dest->m_stringIsValid = false; 286 dest->m_stringIsValid = false;
287 dest->m_string = String(); // Clear the invalid string to avoid cross thread ref counting.
287 } 288 }
288 289
289 String KURLGooglePrivate::componentString(const url_parse::Component& comp) cons t 290 String KURLGooglePrivate::componentString(const url_parse::Component& comp) cons t
290 { 291 {
291 if (!m_isValid || comp.len <= 0) { 292 if (!m_isValid || comp.len <= 0) {
292 // KURL returns a null string if the URL is itself a null string, and an 293 // KURL returns a null string if the URL is itself a null string, and an
293 // empty string for other nonexistent entities. 294 // empty string for other nonexistent entities.
294 if (utf8String().isNull()) 295 if (utf8String().isNull())
295 return String(); 296 return String();
296 return String("", 0); 297 return String("", 0);
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 960
960 if (a.port() != b.port()) 961 if (a.port() != b.port())
961 return false; 962 return false;
962 963
963 return true; 964 return true;
964 } 965 }
965 966
966 } // namespace WebCore 967 } // namespace WebCore
967 968
968 #endif // USE(GOOGLEURL) 969 #endif // USE(GOOGLEURL)
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