Chromium Code Reviews| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 m_loader = adoptPtr(blink::Platform::current()->createURLLoader()); | 134 m_loader = adoptPtr(blink::Platform::current()->createURLLoader()); | 
| 135 ASSERT(m_loader); | 135 ASSERT(m_loader); | 
| 136 blink::WrappedResourceRequest wrappedRequest(request); | 136 blink::WrappedResourceRequest wrappedRequest(request); | 
| 137 wrappedRequest.setAllowStoredCredentials(credentialsAllowed == AllowStoredCr edentials); | 137 wrappedRequest.setAllowStoredCredentials(credentialsAllowed == AllowStoredCr edentials); | 
| 138 m_loader->loadAsynchronously(wrappedRequest, this); | 138 m_loader->loadAsynchronously(wrappedRequest, this); | 
| 139 | 139 | 
| 140 InspectorInstrumentation::willSendRequest(frame, m_identifier, frame->loader ().documentLoader(), request, ResourceResponse(), initiatorInfo); | 140 InspectorInstrumentation::willSendRequest(frame, m_identifier, frame->loader ().documentLoader(), request, ResourceResponse(), initiatorInfo); | 
| 141 | 141 | 
| 142 // If the server never responds, FrameLoader won't be able to cancel this lo ad and | 142 // If the server never responds, FrameLoader won't be able to cancel this lo ad and | 
| 143 // we'll sit here waiting forever. Set a very generous timeout, just in case . | 143 // we'll sit here waiting forever. Set a very generous timeout, just in case . | 
| 144 m_timeout.startOneShot(60000); | 144 m_timeout.startOneShot(60000, FROM_HERE); | 
| 
 
eseidel
2014/03/08 10:14:54
This 16.7 hour timer is definitely my favorite tim
 
 | |
| 145 } | 145 } | 
| 146 | 146 | 
| 147 PingLoader::~PingLoader() | 147 PingLoader::~PingLoader() | 
| 148 { | 148 { | 
| 149 if (m_loader) | 149 if (m_loader) | 
| 150 m_loader->cancel(); | 150 m_loader->cancel(); | 
| 151 } | 151 } | 
| 152 | 152 | 
| 153 void PingLoader::didReceiveResponse(blink::WebURLLoader*, const blink::WebURLRes ponse&) | 153 void PingLoader::didReceiveResponse(blink::WebURLLoader*, const blink::WebURLRes ponse&) | 
| 154 { | 154 { | 
| (...skipping 24 matching lines...) Expand all Loading... | |
| 179 } | 179 } | 
| 180 | 180 | 
| 181 void PingLoader::timeout(Timer<PingLoader>*) | 181 void PingLoader::timeout(Timer<PingLoader>*) | 
| 182 { | 182 { | 
| 183 if (Page* page = this->page()) | 183 if (Page* page = this->page()) | 
| 184 InspectorInstrumentation::didFailLoading(page->mainFrame(), m_identifier , ResourceError::cancelledError(m_url)); | 184 InspectorInstrumentation::didFailLoading(page->mainFrame(), m_identifier , ResourceError::cancelledError(m_url)); | 
| 185 delete this; | 185 delete this; | 
| 186 } | 186 } | 
| 187 | 187 | 
| 188 } | 188 } | 
| OLD | NEW |