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

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

Issue 23658039: [ABANDONED] Get content of resources from Blob when the downloadToFile option is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t otalBytesToBeSent) 103 void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t otalBytesToBeSent)
104 { 104 {
105 ResourceClientWalker<RawResourceClient> w(m_clients); 105 ResourceClientWalker<RawResourceClient> w(m_clients);
106 while (RawResourceClient* c = w.next()) 106 while (RawResourceClient* c = w.next())
107 c->dataSent(this, bytesSent, totalBytesToBeSent); 107 c->dataSent(this, bytesSent, totalBytesToBeSent);
108 } 108 }
109 109
110 void RawResource::didDownloadData(int dataLength) 110 void RawResource::didDownloadData(int dataLength)
111 { 111 {
112 Resource::didDownloadData(dataLength);
113
114 ResourcePtr<RawResource> protect(this);
112 ResourceClientWalker<RawResourceClient> w(m_clients); 115 ResourceClientWalker<RawResourceClient> w(m_clients);
113 while (RawResourceClient* c = w.next()) 116 while (RawResourceClient* c = w.next())
114 c->dataDownloaded(this, dataLength); 117 c->dataDownloaded(this, dataLength);
115 } 118 }
116 119
117 void RawResource::setDefersLoading(bool defers) 120 void RawResource::setDefersLoading(bool defers)
118 { 121 {
119 if (m_loader) 122 if (m_loader)
120 m_loader->setDefersLoading(defers); 123 m_loader->setDefersLoading(defers);
121 } 124 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return true; 190 return true;
188 } 191 }
189 192
190 void RawResource::clear() 193 void RawResource::clear()
191 { 194 {
192 m_data.clear(); 195 m_data.clear();
193 setEncodedSize(0); 196 setEncodedSize(0);
194 } 197 }
195 198
196 } // namespace WebCore 199 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698