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

Side by Side Diff: sky/engine/platform/weborigin/KURL.cpp

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 m_protocolIsInHTTPFamily = other.m_protocolIsInHTTPFamily; 254 m_protocolIsInHTTPFamily = other.m_protocolIsInHTTPFamily;
255 m_parsed = other.m_parsed; 255 m_parsed = other.m_parsed;
256 m_string = other.m_string; 256 m_string = other.m_string;
257 if (other.m_innerURL) 257 if (other.m_innerURL)
258 m_innerURL = adoptPtr(new KURL(other.m_innerURL->copy())); 258 m_innerURL = adoptPtr(new KURL(other.m_innerURL->copy()));
259 else 259 else
260 m_innerURL.clear(); 260 m_innerURL.clear();
261 return *this; 261 return *this;
262 } 262 }
263 263
264 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
264 KURL::KURL(KURL&& other) 265 KURL::KURL(KURL&& other)
265 : m_isValid(other.m_isValid) 266 : m_isValid(other.m_isValid)
266 , m_protocolIsInHTTPFamily(other.m_protocolIsInHTTPFamily) 267 , m_protocolIsInHTTPFamily(other.m_protocolIsInHTTPFamily)
267 , m_parsed(other.m_parsed) 268 , m_parsed(other.m_parsed)
268 // FIXME: Instead of explicitly casting to String&& here, we should use std: :move, but that requires us to 269 // FIXME: Instead of explicitly casting to String&& here, we should use std: :move, but that requires us to
269 // have a standard library that supports move semantics. 270 // have a standard library that supports move semantics.
270 , m_string(static_cast<String&&>(other.m_string)) 271 , m_string(static_cast<String&&>(other.m_string))
271 , m_innerURL(other.m_innerURL.release()) 272 , m_innerURL(other.m_innerURL.release())
272 { 273 {
273 } 274 }
274 275
275 KURL& KURL::operator=(KURL&& other) 276 KURL& KURL::operator=(KURL&& other)
276 { 277 {
277 m_isValid = other.m_isValid; 278 m_isValid = other.m_isValid;
278 m_protocolIsInHTTPFamily = other.m_protocolIsInHTTPFamily; 279 m_protocolIsInHTTPFamily = other.m_protocolIsInHTTPFamily;
279 m_parsed = other.m_parsed; 280 m_parsed = other.m_parsed;
280 // FIXME: Instead of explicitly casting to String&& here, we should use std: :move, but that requires us to 281 // FIXME: Instead of explicitly casting to String&& here, we should use std: :move, but that requires us to
281 // have a standard library that supports move semantics. 282 // have a standard library that supports move semantics.
282 m_string = static_cast<String&&>(other.m_string); 283 m_string = static_cast<String&&>(other.m_string);
283 m_innerURL = other.m_innerURL.release(); 284 m_innerURL = other.m_innerURL.release();
284 return *this; 285 return *this;
285 } 286 }
287 #endif
286 288
287 KURL KURL::copy() const 289 KURL KURL::copy() const
288 { 290 {
289 KURL result; 291 KURL result;
290 result.m_isValid = m_isValid; 292 result.m_isValid = m_isValid;
291 result.m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily; 293 result.m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily;
292 result.m_parsed = m_parsed; 294 result.m_parsed = m_parsed;
293 result.m_string = m_string.isolatedCopy(); 295 result.m_string = m_string.isolatedCopy();
294 if (m_innerURL) 296 if (m_innerURL)
295 result.m_innerURL = adoptPtr(new KURL(m_innerURL->copy())); 297 result.m_innerURL = adoptPtr(new KURL(m_innerURL->copy()));
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 m_string = AtomicString::fromUTF8(output.data(), output.length()); 913 m_string = AtomicString::fromUTF8(output.data(), output.length());
912 } 914 }
913 915
914 bool KURL::isSafeToSendToAnotherThread() const 916 bool KURL::isSafeToSendToAnotherThread() const
915 { 917 {
916 return m_string.isSafeToSendToAnotherThread() 918 return m_string.isSafeToSendToAnotherThread()
917 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 919 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
918 } 920 }
919 921
920 } // namespace blink 922 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698