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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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) 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 String KURL::query() const { 410 String KURL::query() const {
411 if (m_parsed.query.len >= 0) 411 if (m_parsed.query.len >= 0)
412 return componentString(m_parsed.query); 412 return componentString(m_parsed.query);
413 413
414 // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns 414 // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns
415 // an empty string when the query is empty rather than a null (not sure 415 // an empty string when the query is empty rather than a null (not sure
416 // which is right). 416 // which is right).
417 // Returns a null if the query is not specified, instead of empty. 417 // Returns a null if the query is not specified, instead of empty.
418 if (m_parsed.query.is_valid()) 418 if (m_parsed.query.is_valid())
419 return emptyString(); 419 return emptyString;
420 return String(); 420 return String();
421 } 421 }
422 422
423 String KURL::path() const { 423 String KURL::path() const {
424 return componentString(m_parsed.path); 424 return componentString(m_parsed.path);
425 } 425 }
426 426
427 bool KURL::setProtocol(const String& protocol) { 427 bool KURL::setProtocol(const String& protocol) {
428 // Firefox and IE remove everything after the first ':'. 428 // Firefox and IE remove everything after the first ':'.
429 int separatorPosition = protocol.find(':'); 429 int separatorPosition = protocol.find(':');
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 m_string = AtomicString::fromUTF8(output.data(), output.length()); 873 m_string = AtomicString::fromUTF8(output.data(), output.length());
874 initProtocolMetadata(); 874 initProtocolMetadata();
875 } 875 }
876 876
877 bool KURL::isSafeToSendToAnotherThread() const { 877 bool KURL::isSafeToSendToAnotherThread() const {
878 return m_string.isSafeToSendToAnotherThread() && 878 return m_string.isSafeToSendToAnotherThread() &&
879 (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 879 (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
880 } 880 }
881 881
882 } // namespace blink 882 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleWin.cpp ('k') | third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698