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

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

Issue 23887002: Header cleanup: don't include system header stdio.h in non-debug builds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
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 17 matching lines...) Expand all
28 #include "config.h" 28 #include "config.h"
29 #include "weborigin/KURL.h" 29 #include "weborigin/KURL.h"
30 30
31 #include "wtf/HashMap.h" 31 #include "wtf/HashMap.h"
32 #include "wtf/StdLibExtras.h" 32 #include "wtf/StdLibExtras.h"
33 #include "wtf/text/CString.h" 33 #include "wtf/text/CString.h"
34 #include "wtf/text/StringHash.h" 34 #include "wtf/text/StringHash.h"
35 #include "wtf/text/StringUTF8Adaptor.h" 35 #include "wtf/text/StringUTF8Adaptor.h"
36 #include "wtf/text/TextEncoding.h" 36 #include "wtf/text/TextEncoding.h"
37 #include <algorithm> 37 #include <algorithm>
38 #include <stdio.h>
39 #include <url/url_util.h> 38 #include <url/url_util.h>
40 39
41 namespace WebCore { 40 namespace WebCore {
42 41
43 static const unsigned maximumValidPortNumber = 0xFFFE; 42 static const unsigned maximumValidPortNumber = 0xFFFE;
44 static const unsigned invalidPortNumber = 0xFFFF; 43 static const unsigned invalidPortNumber = 0xFFFF;
45 44
46 static void assertProtocolIsGood(const char* protocol) 45 static void assertProtocolIsGood(const char* protocol)
47 { 46 {
48 #ifndef NDEBUG 47 #ifndef NDEBUG
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 if (!m_parsed.scheme.is_nonempty()) 624 if (!m_parsed.scheme.is_nonempty())
626 return false; 625 return false;
627 if (!m_string.isNull() && m_string.is8Bit()) 626 if (!m_string.isNull() && m_string.is8Bit())
628 return url_util::IsStandard(asURLChar8Subtle(m_string), m_parsed.scheme) ; 627 return url_util::IsStandard(asURLChar8Subtle(m_string), m_parsed.scheme) ;
629 return url_util::IsStandard(m_string.characters16(), m_parsed.scheme); 628 return url_util::IsStandard(m_string.characters16(), m_parsed.scheme);
630 } 629 }
631 630
632 #ifndef NDEBUG 631 #ifndef NDEBUG
633 void KURL::print() const 632 void KURL::print() const
634 { 633 {
635 printf("%s\n", m_string.utf8().data()); 634 printf("%s\n", m_string.utf8().data());
Nico 2013/09/03 15:55:14 This requires stdio.h. (fprintf(stderr, …) would
636 } 635 }
637 #endif 636 #endif
638 637
639 bool equalIgnoringFragmentIdentifier(const KURL& a, const KURL& b) 638 bool equalIgnoringFragmentIdentifier(const KURL& a, const KURL& b)
640 { 639 {
641 // Compute the length of each URL without its ref. Note that the reference 640 // Compute the length of each URL without its ref. Note that the reference
642 // begin (if it exists) points to the character *after* the '#', so we need 641 // begin (if it exists) points to the character *after* the '#', so we need
643 // to subtract one. 642 // to subtract one.
644 int aLength = a.m_string.length(); 643 int aLength = a.m_string.length();
645 if (a.m_parsed.ref.len >= 0) 644 if (a.m_parsed.ref.len >= 0)
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 m_string = AtomicString::fromUTF8(output.data(), output.length()); 841 m_string = AtomicString::fromUTF8(output.data(), output.length());
843 } 842 }
844 843
845 bool KURL::isSafeToSendToAnotherThread() const 844 bool KURL::isSafeToSendToAnotherThread() const
846 { 845 {
847 return m_string.isSafeToSendToAnotherThread() 846 return m_string.isSafeToSendToAnotherThread()
848 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 847 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
849 } 848 }
850 849
851 } // namespace WebCore 850 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698