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

Side by Side Diff: Source/core/fetch/RawResource.cpp

Issue 673243002: Rename Resource::willSendRequest() to willFollowRedirect() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed #4 Created 6 years, 2 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
« no previous file with comments | « Source/core/fetch/RawResource.h ('k') | Source/core/fetch/Resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 client->responseReceived(this, m_response); 68 client->responseReceived(this, m_response);
69 if (!hasClient(c)) 69 if (!hasClient(c))
70 return; 70 return;
71 if (m_data) 71 if (m_data)
72 client->dataReceived(this, m_data->data(), m_data->size()); 72 client->dataReceived(this, m_data->data(), m_data->size());
73 if (!hasClient(c)) 73 if (!hasClient(c))
74 return; 74 return;
75 Resource::didAddClient(client); 75 Resource::didAddClient(client);
76 } 76 }
77 77
78 void RawResource::willSendRequest(ResourceRequest& request, const ResourceRespon se& response) 78 void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource Response& redirectResponse)
79 { 79 {
80 ResourcePtr<RawResource> protect(this); 80 ResourcePtr<RawResource> protect(this);
81 if (!response.isNull()) { 81 if (!redirectResponse.isNull()) {
82 ResourceClientWalker<RawResourceClient> w(m_clients); 82 ResourceClientWalker<RawResourceClient> w(m_clients);
83 while (RawResourceClient* c = w.next()) 83 while (RawResourceClient* c = w.next())
84 c->redirectReceived(this, request, response); 84 c->redirectReceived(this, newRequest, redirectResponse);
85 } 85 }
86 Resource::willSendRequest(request, response); 86 Resource::willFollowRedirect(newRequest, redirectResponse);
87 } 87 }
88 88
89 void RawResource::updateRequest(const ResourceRequest& request) 89 void RawResource::updateRequest(const ResourceRequest& request)
90 { 90 {
91 ResourcePtr<RawResource> protect(this); 91 ResourcePtr<RawResource> protect(this);
92 ResourceClientWalker<RawResourceClient> w(m_clients); 92 ResourceClientWalker<RawResourceClient> w(m_clients);
93 while (RawResourceClient* c = w.next()) 93 while (RawResourceClient* c = w.next())
94 c->updateRequest(this, request); 94 c->updateRequest(this, request);
95 } 95 }
96 96
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 for (const auto& header : oldHeaders) { 179 for (const auto& header : oldHeaders) {
180 AtomicString headerName = header.key; 180 AtomicString headerName = header.key;
181 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH eaders.get(headerName)) 181 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH eaders.get(headerName))
182 return false; 182 return false;
183 } 183 }
184 184
185 return true; 185 return true;
186 } 186 }
187 187
188 } // namespace blink 188 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fetch/RawResource.h ('k') | Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698