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

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

Issue 23444058: Use downloadToFile option when XHR downloads a Blob (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase test style and XHR Created 7 years 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/loader/FrameFetchContext.h ('k') | Source/core/loader/WorkerThreadableLoader.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, ens ureLoader(loader), r, resourceLoader); 128 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, ens ureLoader(loader), r, resourceLoader);
129 } 129 }
130 130
131 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id entifier, const char* data, int dataLength, int encodedDataLength) 131 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id entifier, const char* data, int dataLength, int encodedDataLength)
132 { 132 {
133 if (Page* page = m_frame->page()) 133 if (Page* page = m_frame->page())
134 page->progress().incrementProgress(identifier, data, dataLength); 134 page->progress().incrementProgress(identifier, data, dataLength);
135 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng th, encodedDataLength); 135 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng th, encodedDataLength);
136 } 136 }
137 137
138 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i dentifier, int dataLength, int encodedDataLength)
139 {
140 if (Page* page = m_frame->page())
141 page->progress().incrementProgress(identifier, 0, dataLength);
142 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength, encodedDataLength);
143 }
144
138 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne d long identifier, double finishTime) 145 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne d long identifier, double finishTime)
139 { 146 {
140 if (Page* page = m_frame->page()) 147 if (Page* page = m_frame->page())
141 page->progress().completeProgress(identifier); 148 page->progress().completeProgress(identifier);
142 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); 149 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier);
143 150
144 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader (loader), finishTime); 151 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader (loader), finishTime);
145 } 152 }
146 153
147 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id entifier, const ResourceError& error) 154 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id entifier, const ResourceError& error)
(...skipping 11 matching lines...) Expand all
159 if (dataLength > 0) 166 if (dataLength > 0)
160 dispatchDidReceiveData(ensureLoader(loader), identifier, data, dataLengt h, encodedDataLength); 167 dispatchDidReceiveData(ensureLoader(loader), identifier, data, dataLengt h, encodedDataLength);
161 168
162 if (error.isNull()) 169 if (error.isNull())
163 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); 170 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0);
164 else 171 else
165 dispatchDidFail(ensureLoader(loader), identifier, error); 172 dispatchDidFail(ensureLoader(loader), identifier, error);
166 } 173 }
167 174
168 } // namespace WebCore 175 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FrameFetchContext.h ('k') | Source/core/loader/WorkerThreadableLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698