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

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

Issue 126753002: Update the ResourceRequest in DocumentLoader after the embedder modified it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 6 years, 11 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
« 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 ResourcePtr<RawResource> protect(this); 83 ResourcePtr<RawResource> protect(this);
84 if (!response.isNull()) { 84 if (!response.isNull()) {
85 ResourceClientWalker<RawResourceClient> w(m_clients); 85 ResourceClientWalker<RawResourceClient> w(m_clients);
86 while (RawResourceClient* c = w.next()) 86 while (RawResourceClient* c = w.next())
87 c->redirectReceived(this, request, response); 87 c->redirectReceived(this, request, response);
88 m_redirectChain.append(RedirectPair(request, response)); 88 m_redirectChain.append(RedirectPair(request, response));
89 } 89 }
90 Resource::willSendRequest(request, response); 90 Resource::willSendRequest(request, response);
91 } 91 }
92 92
93 void RawResource::updateRequest(const ResourceRequest& request)
94 {
95 ResourcePtr<RawResource> protect(this);
96 ResourceClientWalker<RawResourceClient> w(m_clients);
97 while (RawResourceClient* c = w.next())
98 c->updateRequest(this, request);
99 }
100
93 void RawResource::responseReceived(const ResourceResponse& response) 101 void RawResource::responseReceived(const ResourceResponse& response)
94 { 102 {
95 InternalResourcePtr protect(this); 103 InternalResourcePtr protect(this);
96 Resource::responseReceived(response); 104 Resource::responseReceived(response);
97 ResourceClientWalker<RawResourceClient> w(m_clients); 105 ResourceClientWalker<RawResourceClient> w(m_clients);
98 while (RawResourceClient* c = w.next()) 106 while (RawResourceClient* c = w.next())
99 c->responseReceived(this, m_response); 107 c->responseReceived(this, m_response);
100 } 108 }
101 109
102 void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t otalBytesToBeSent) 110 void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t otalBytesToBeSent)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 181
174 for (size_t i = 0; i < m_redirectChain.size(); i++) { 182 for (size_t i = 0; i < m_redirectChain.size(); i++) {
175 if (m_redirectChain[i].m_redirectResponse.cacheControlContainsNoStore()) 183 if (m_redirectChain[i].m_redirectResponse.cacheControlContainsNoStore())
176 return false; 184 return false;
177 } 185 }
178 186
179 return true; 187 return true;
180 } 188 }
181 189
182 } // namespace WebCore 190 } // namespace WebCore
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