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

Side by Side Diff: Source/core/loader/PingLoader.cpp

Issue 16140020: Delete NetworkingContext and its subclasses. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Leak the ping loader, since it will kill itself as soon as it receives a response. 119 // Leak the ping loader, since it will kill itself as soon as it receives a response.
120 PingLoader* leakedPingLoader = pingLoader.leakPtr(); 120 PingLoader* leakedPingLoader = pingLoader.leakPtr();
121 UNUSED_PARAM(leakedPingLoader); 121 UNUSED_PARAM(leakedPingLoader);
122 } 122 }
123 123
124 PingLoader::PingLoader(Frame* frame, ResourceRequest& request, StoredCredentials credentialsAllowed) 124 PingLoader::PingLoader(Frame* frame, ResourceRequest& request, StoredCredentials credentialsAllowed)
125 : m_timeout(this, &PingLoader::timeout) 125 : m_timeout(this, &PingLoader::timeout)
126 { 126 {
127 unsigned long identifier = createUniqueIdentifier(); 127 unsigned long identifier = createUniqueIdentifier();
128 m_handle = ResourceHandle::create(frame->loader()->networkingContext(), requ est, this, false, false, credentialsAllowed); 128 m_handle = ResourceHandle::create(request, this, false, false, credentialsAl lowed);
129 129
130 InspectorInstrumentation::continueAfterPingLoader(frame, identifier, frame-> loader()->activeDocumentLoader(), request, ResourceResponse()); 130 InspectorInstrumentation::continueAfterPingLoader(frame, identifier, frame-> loader()->activeDocumentLoader(), request, ResourceResponse());
131 131
132 // If the server never responds, FrameLoader won't be able to cancel this lo ad and 132 // If the server never responds, FrameLoader won't be able to cancel this lo ad and
133 // we'll sit here waiting forever. Set a very generous timeout, just in case . 133 // we'll sit here waiting forever. Set a very generous timeout, just in case .
134 m_timeout.startOneShot(60000); 134 m_timeout.startOneShot(60000);
135 } 135 }
136 136
137 PingLoader::~PingLoader() 137 PingLoader::~PingLoader()
138 { 138 {
139 if (m_handle) 139 if (m_handle)
140 m_handle->cancel(); 140 m_handle->cancel();
141 } 141 }
142 142
143 } 143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698