| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 InspectorInstrumentation::willSendRequest(frame, m_identifier, frame->loader
().documentLoader(), request, ResourceResponse(), initiatorInfo); | 145 InspectorInstrumentation::willSendRequest(frame, m_identifier, frame->loader
().documentLoader(), request, ResourceResponse(), initiatorInfo); |
| 146 | 146 |
| 147 m_loader = adoptPtr(Platform::current()->createURLLoader()); | 147 m_loader = adoptPtr(Platform::current()->createURLLoader()); |
| 148 ASSERT(m_loader); | 148 ASSERT(m_loader); |
| 149 WrappedResourceRequest wrappedRequest(request); | 149 WrappedResourceRequest wrappedRequest(request); |
| 150 wrappedRequest.setAllowStoredCredentials(credentialsAllowed == AllowStoredCr
edentials); | 150 wrappedRequest.setAllowStoredCredentials(credentialsAllowed == AllowStoredCr
edentials); |
| 151 m_loader->loadAsynchronously(wrappedRequest, this); | 151 m_loader->loadAsynchronously(wrappedRequest, this); |
| 152 | 152 |
| 153 // If the server never responds, FrameLoader won't be able to cancel this lo
ad and | 153 // If the server never responds, FrameLoader won't be able to cancel this lo
ad and |
| 154 // we'll sit here waiting forever. Set a very generous timeout, just in case
. | 154 // we'll sit here waiting forever. Set a very generous timeout, just in case
. |
| 155 m_timeout.startOneShot(60000, FROM_HERE); | 155 m_timeout.startOneShot(60000, BLINK_FROM_HERE); |
| 156 } | 156 } |
| 157 | 157 |
| 158 PingLoader::~PingLoader() | 158 PingLoader::~PingLoader() |
| 159 { | 159 { |
| 160 if (m_loader) | 160 if (m_loader) |
| 161 m_loader->cancel(); | 161 m_loader->cancel(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void PingLoader::dispose() | 164 void PingLoader::dispose() |
| 165 { | 165 { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError:
:cancelledError(m_url)); | 222 InspectorInstrumentation::didFailLoading(frame, m_identifier, ResourceError:
:cancelledError(m_url)); |
| 223 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError(
m_url)); | 223 frame->console().didFailLoading(m_identifier, ResourceError::cancelledError(
m_url)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 DEFINE_TRACE(PingLoader) | 226 DEFINE_TRACE(PingLoader) |
| 227 { | 227 { |
| 228 LocalFrameLifecycleObserver::trace(visitor); | 228 LocalFrameLifecycleObserver::trace(visitor); |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace blink | 231 } // namespace blink |
| OLD | NEW |