| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 initiatorInfo.name = FetchInitiatorTypeNames::violationreport; | 121 initiatorInfo.name = FetchInitiatorTypeNames::violationreport; |
| 122 PingLoader::start(frame, request, initiatorInfo, SecurityOrigin::create(repo
rtURL)->isSameSchemeHostPort(frame->document()->securityOrigin()) ? AllowStoredC
redentials : DoNotAllowStoredCredentials); | 122 PingLoader::start(frame, request, initiatorInfo, SecurityOrigin::create(repo
rtURL)->isSameSchemeHostPort(frame->document()->securityOrigin()) ? AllowStoredC
redentials : DoNotAllowStoredCredentials); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void PingLoader::start(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) | 125 void PingLoader::start(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) |
| 126 { | 126 { |
| 127 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) | 127 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) |
| 128 return; | 128 return; |
| 129 | 129 |
| 130 // Leak the ping loader, since it will kill itself as soon as it receives a
response. | 130 // Leak the ping loader, since it will kill itself as soon as it receives a
response. |
| 131 RefPtrWillBeRawPtr<PingLoader> loader = adoptRefWillBeNoop(new PingLoader(fr
ame, request, initiatorInfo, credentialsAllowed)); | 131 RawPtr<PingLoader> loader = (new PingLoader(frame, request, initiatorInfo, c
redentialsAllowed)); |
| 132 loader->ref(); | 132 loader->ref(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 PingLoader::PingLoader(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) | 135 PingLoader::PingLoader(LocalFrame* frame, ResourceRequest& request, const FetchI
nitiatorInfo& initiatorInfo, StoredCredentials credentialsAllowed) |
| 136 : LocalFrameLifecycleObserver(frame) | 136 : LocalFrameLifecycleObserver(frame) |
| 137 , m_timeout(this, &PingLoader::timeout) | 137 , m_timeout(this, &PingLoader::timeout) |
| 138 , m_url(request.url()) | 138 , m_url(request.url()) |
| 139 , m_identifier(createUniqueIdentifier()) | 139 , m_identifier(createUniqueIdentifier()) |
| 140 { | 140 { |
| 141 frame->loader().client()->didDispatchPingLoader(request.url()); | 141 frame->loader().client()->didDispatchPingLoader(request.url()); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError:
:cancelledError(m_url)); | 221 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError:
:cancelledError(m_url)); |
| 222 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError(
m_url)); | 222 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError(
m_url)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 DEFINE_TRACE(PingLoader) | 225 DEFINE_TRACE(PingLoader) |
| 226 { | 226 { |
| 227 LocalFrameLifecycleObserver::trace(visitor); | 227 LocalFrameLifecycleObserver::trace(visitor); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |