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

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2063773002: Reland: WTF: Implement explicit RefPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestCrossOrig inWithCredentials); 879 UseCounter::count(&executionContext, UseCounter::XMLHttpRequestCrossOrig inWithCredentials);
880 880
881 // We also remember whether upload events should be allowed for this request in case the upload listeners are 881 // We also remember whether upload events should be allowed for this request in case the upload listeners are
882 // added after the request is started. 882 // added after the request is started.
883 m_uploadEventsAllowed = m_sameOriginRequest || uploadEvents || !FetchUtils:: isSimpleRequest(m_method, m_requestHeaders); 883 m_uploadEventsAllowed = m_sameOriginRequest || uploadEvents || !FetchUtils:: isSimpleRequest(m_method, m_requestHeaders);
884 884
885 ResourceRequest request(m_url); 885 ResourceRequest request(m_url);
886 request.setHTTPMethod(m_method); 886 request.setHTTPMethod(m_method);
887 request.setRequestContext(WebURLRequest::RequestContextXMLHttpRequest); 887 request.setRequestContext(WebURLRequest::RequestContextXMLHttpRequest);
888 request.setFetchCredentialsMode(m_includeCredentials ? WebURLRequest::FetchC redentialsModeInclude : WebURLRequest::FetchCredentialsModeSameOrigin); 888 request.setFetchCredentialsMode(m_includeCredentials ? WebURLRequest::FetchC redentialsModeInclude : WebURLRequest::FetchCredentialsModeSameOrigin);
889 request.setSkipServiceWorker(m_isolatedWorldSecurityOrigin); 889 request.setSkipServiceWorker(m_isolatedWorldSecurityOrigin.get());
890 request.setExternalRequestStateFromRequestorAddressSpace(executionContext.se curityContext().addressSpace()); 890 request.setExternalRequestStateFromRequestorAddressSpace(executionContext.se curityContext().addressSpace());
891 891
892 InspectorInstrumentation::willLoadXHR(&executionContext, this, this, m_metho d, m_url, m_async, httpBody ? httpBody->deepCopy() : nullptr, m_requestHeaders, m_includeCredentials); 892 InspectorInstrumentation::willLoadXHR(&executionContext, this, this, m_metho d, m_url, m_async, httpBody ? httpBody->deepCopy() : nullptr, m_requestHeaders, m_includeCredentials);
893 893
894 if (httpBody) { 894 if (httpBody) {
895 ASSERT(m_method != HTTPNames::GET); 895 ASSERT(m_method != HTTPNames::GET);
896 ASSERT(m_method != HTTPNames::HEAD); 896 ASSERT(m_method != HTTPNames::HEAD);
897 request.setHTTPBody(httpBody); 897 request.setHTTPBody(httpBody);
898 } 898 }
899 899
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 visitor->trace(m_responseArrayBuffer); 1709 visitor->trace(m_responseArrayBuffer);
1710 visitor->trace(m_progressEventThrottle); 1710 visitor->trace(m_progressEventThrottle);
1711 visitor->trace(m_upload); 1711 visitor->trace(m_upload);
1712 visitor->trace(m_blobLoader); 1712 visitor->trace(m_blobLoader);
1713 XMLHttpRequestEventTarget::trace(visitor); 1713 XMLHttpRequestEventTarget::trace(visitor);
1714 DocumentParserClient::trace(visitor); 1714 DocumentParserClient::trace(visitor);
1715 ActiveDOMObject::trace(visitor); 1715 ActiveDOMObject::trace(visitor);
1716 } 1716 }
1717 1717
1718 } // namespace blink 1718 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/platform/PODRedBlackTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698