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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 : m_isValid(false), 249 : m_isValid(false),
250 m_protocolIsInHTTPFamily(false), 250 m_protocolIsInHTTPFamily(false),
251 m_string(WTF::HashTableDeletedValue) {} 251 m_string(WTF::HashTableDeletedValue) {}
252 252
253 KURL::KURL(const KURL& other) 253 KURL::KURL(const KURL& other)
254 : m_isValid(other.m_isValid), 254 : m_isValid(other.m_isValid),
255 m_protocolIsInHTTPFamily(other.m_protocolIsInHTTPFamily), 255 m_protocolIsInHTTPFamily(other.m_protocolIsInHTTPFamily),
256 m_parsed(other.m_parsed), 256 m_parsed(other.m_parsed),
257 m_string(other.m_string) { 257 m_string(other.m_string) {
258 if (other.m_innerURL.get()) 258 if (other.m_innerURL.get())
259 m_innerURL = wrapUnique(new KURL(other.m_innerURL->copy())); 259 m_innerURL = WTF::wrapUnique(new KURL(other.m_innerURL->copy()));
260 } 260 }
261 261
262 KURL::~KURL() {} 262 KURL::~KURL() {}
263 263
264 KURL& KURL::operator=(const KURL& other) { 264 KURL& KURL::operator=(const KURL& other) {
265 m_isValid = other.m_isValid; 265 m_isValid = other.m_isValid;
266 m_protocolIsInHTTPFamily = other.m_protocolIsInHTTPFamily; 266 m_protocolIsInHTTPFamily = other.m_protocolIsInHTTPFamily;
267 m_parsed = other.m_parsed; 267 m_parsed = other.m_parsed;
268 m_string = other.m_string; 268 m_string = other.m_string;
269 if (other.m_innerURL) 269 if (other.m_innerURL)
270 m_innerURL = wrapUnique(new KURL(other.m_innerURL->copy())); 270 m_innerURL = WTF::wrapUnique(new KURL(other.m_innerURL->copy()));
271 else 271 else
272 m_innerURL.reset(); 272 m_innerURL.reset();
273 return *this; 273 return *this;
274 } 274 }
275 275
276 KURL KURL::copy() const { 276 KURL KURL::copy() const {
277 KURL result; 277 KURL result;
278 result.m_isValid = m_isValid; 278 result.m_isValid = m_isValid;
279 result.m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily; 279 result.m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily;
280 result.m_parsed = m_parsed; 280 result.m_parsed = m_parsed;
281 result.m_string = m_string.isolatedCopy(); 281 result.m_string = m_string.isolatedCopy();
282 if (m_innerURL) 282 if (m_innerURL)
283 result.m_innerURL = wrapUnique(new KURL(m_innerURL->copy())); 283 result.m_innerURL = WTF::wrapUnique(new KURL(m_innerURL->copy()));
284 return result; 284 return result;
285 } 285 }
286 286
287 bool KURL::isNull() const { 287 bool KURL::isNull() const {
288 return m_string.isNull(); 288 return m_string.isNull();
289 } 289 }
290 290
291 bool KURL::isEmpty() const { 291 bool KURL::isEmpty() const {
292 return m_string.isEmpty(); 292 return m_string.isEmpty();
293 } 293 }
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 initInnerURL(); 771 initInnerURL();
772 DCHECK_EQ(protocol(), protocol().lower()); 772 DCHECK_EQ(protocol(), protocol().lower());
773 } 773 }
774 774
775 void KURL::initInnerURL() { 775 void KURL::initInnerURL() {
776 if (!m_isValid) { 776 if (!m_isValid) {
777 m_innerURL.reset(); 777 m_innerURL.reset();
778 return; 778 return;
779 } 779 }
780 if (url::Parsed* innerParsed = m_parsed.inner_parsed()) 780 if (url::Parsed* innerParsed = m_parsed.inner_parsed())
781 m_innerURL = wrapUnique(new KURL( 781 m_innerURL = WTF::wrapUnique(new KURL(
782 ParsedURLString, 782 ParsedURLString,
783 m_string.substring(innerParsed->scheme.begin, 783 m_string.substring(innerParsed->scheme.begin,
784 innerParsed->Length() - innerParsed->scheme.begin))); 784 innerParsed->Length() - innerParsed->scheme.begin)));
785 else 785 else
786 m_innerURL.reset(); 786 m_innerURL.reset();
787 } 787 }
788 788
789 template <typename CHAR> 789 template <typename CHAR>
790 bool internalProtocolIs(const url::Component& scheme, 790 bool internalProtocolIs(const url::Component& scheme,
791 const CHAR* spec, 791 const CHAR* spec,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 m_parsed = newParsed; 883 m_parsed = newParsed;
884 m_string = AtomicString::fromUTF8(output.data(), output.length()); 884 m_string = AtomicString::fromUTF8(output.data(), output.length());
885 } 885 }
886 886
887 bool KURL::isSafeToSendToAnotherThread() const { 887 bool KURL::isSafeToSendToAnotherThread() const {
888 return m_string.isSafeToSendToAnotherThread() && 888 return m_string.isSafeToSendToAnotherThread() &&
889 (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 889 (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
890 } 890 }
891 891
892 } // namespace blink 892 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698