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

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

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

Powered by Google App Engine
This is Rietveld 408576698