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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 2264503002: Clean up SecurityOrigin handling around CrossOriginAccessControl::handleRedirect() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 return m_sameOriginRequest && getSecurityOrigin()->canRequest(url); 953 return m_sameOriginRequest && getSecurityOrigin()->canRequest(url);
954 } 954 }
955 955
956 StoredCredentials DocumentThreadableLoader::effectiveAllowCredentials() const 956 StoredCredentials DocumentThreadableLoader::effectiveAllowCredentials() const
957 { 957 {
958 if (m_forceDoNotAllowStoredCredentials) 958 if (m_forceDoNotAllowStoredCredentials)
959 return DoNotAllowStoredCredentials; 959 return DoNotAllowStoredCredentials;
960 return m_resourceLoaderOptions.allowCredentials; 960 return m_resourceLoaderOptions.allowCredentials;
961 } 961 }
962 962
963 SecurityOrigin* DocumentThreadableLoader::getSecurityOrigin() const 963 const SecurityOrigin* DocumentThreadableLoader::getSecurityOrigin() const
964 { 964 {
965 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri gin(); 965 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri gin();
966 } 966 }
967 967
968 Document& DocumentThreadableLoader::document() const 968 Document& DocumentThreadableLoader::document() const
969 { 969 {
970 ASSERT(m_document); 970 ASSERT(m_document);
971 return *m_document; 971 return *m_document;
972 } 972 }
973 973
974 DEFINE_TRACE(DocumentThreadableLoader) 974 DEFINE_TRACE(DocumentThreadableLoader)
975 { 975 {
976 visitor->trace(m_resource); 976 visitor->trace(m_resource);
977 visitor->trace(m_document); 977 visitor->trace(m_document);
978 ThreadableLoader::trace(visitor); 978 ThreadableLoader::trace(visitor);
979 RawResourceClient::trace(visitor); 979 RawResourceClient::trace(visitor);
980 } 980 }
981 981
982 } // namespace blink 982 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698