OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 initiatorInfo.name = FetchInitiatorTypeNames::violationreport; | 119 initiatorInfo.name = FetchInitiatorTypeNames::violationreport; |
120 PingLoader::start(frame, request, initiatorInfo, SecurityOrigin::create(repo
rtURL)->isSameSchemeHostPort(frame->document()->getSecurityOrigin()) ? AllowStor
edCredentials : DoNotAllowStoredCredentials); | 120 PingLoader::start(frame, request, initiatorInfo, SecurityOrigin::create(repo
rtURL)->isSameSchemeHostPort(frame->document()->getSecurityOrigin()) ? AllowStor
edCredentials : DoNotAllowStoredCredentials); |
121 } | 121 } |
122 | 122 |
123 void PingLoader::start(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) | 123 void PingLoader::start(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) |
124 { | 124 { |
125 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) | 125 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) |
126 return; | 126 return; |
127 | 127 |
128 // Leak the ping loader, since it will kill itself as soon as it receives a
response. | 128 // Leak the ping loader, since it will kill itself as soon as it receives a
response. |
129 RefPtrWillBeRawPtr<PingLoader> loader = adoptRefWillBeNoop(new PingLoader(fr
ame, request, initiatorInfo, credentialsAllowed)); | 129 RawPtr<PingLoader> loader = new PingLoader(frame, request, initiatorInfo, cr
edentialsAllowed); |
130 loader->ref(); | 130 loader->ref(); |
131 } | 131 } |
132 | 132 |
133 PingLoader::PingLoader(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) | 133 PingLoader::PingLoader(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) |
134 : LocalFrameLifecycleObserver(frame) | 134 : LocalFrameLifecycleObserver(frame) |
135 , m_timeout(this, &PingLoader::timeout) | 135 , m_timeout(this, &PingLoader::timeout) |
136 , m_url(request.url()) | 136 , m_url(request.url()) |
137 , m_identifier(createUniqueIdentifier()) | 137 , m_identifier(createUniqueIdentifier()) |
138 { | 138 { |
139 frame->loader().client()->didDispatchPingLoader(request.url()); | 139 frame->loader().client()->didDispatchPingLoader(request.url()); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError:
:cancelledError(m_url)); | 219 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError:
:cancelledError(m_url)); |
220 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError(
m_url)); | 220 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError(
m_url)); |
221 } | 221 } |
222 | 222 |
223 DEFINE_TRACE(PingLoader) | 223 DEFINE_TRACE(PingLoader) |
224 { | 224 { |
225 LocalFrameLifecycleObserver::trace(visitor); | 225 LocalFrameLifecycleObserver::trace(visitor); |
226 } | 226 } |
227 | 227 |
228 } // namespace blink | 228 } // namespace blink |
OLD | NEW |