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

Side by Side Diff: webkit/plugins/npapi/webplugin_impl.cc

Issue 6771043: Enabled actual transfer size in chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/npapi/webplugin_impl.h" 5 #include "webkit/plugins/npapi/webplugin_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 int length_received) { 970 int length_received) {
971 WebPluginResourceClient* client = GetClientFromLoader(loader); 971 WebPluginResourceClient* client = GetClientFromLoader(loader);
972 if (!client) 972 if (!client)
973 return; 973 return;
974 974
975 MultiPartResponseHandlerMap::iterator index = 975 MultiPartResponseHandlerMap::iterator index =
976 multi_part_response_map_.find(client); 976 multi_part_response_map_.find(client);
977 if (index != multi_part_response_map_.end()) { 977 if (index != multi_part_response_map_.end()) {
978 MultipartResponseDelegate* multi_part_handler = (*index).second; 978 MultipartResponseDelegate* multi_part_handler = (*index).second;
979 DCHECK(multi_part_handler != NULL); 979 DCHECK(multi_part_handler != NULL);
980 multi_part_handler->OnReceivedData(buffer, data_length); 980 multi_part_handler->OnReceivedData(buffer, data_length, length_received);
981 } else { 981 } else {
982 loader->setDefersLoading(true); 982 loader->setDefersLoading(true);
983 client->DidReceiveData(buffer, data_length, 0); 983 client->DidReceiveData(buffer, data_length, 0);
984 } 984 }
985 } 985 }
986 986
987 void WebPluginImpl::didFinishLoading(WebURLLoader* loader, double finishTime) { 987 void WebPluginImpl::didFinishLoading(WebURLLoader* loader, double finishTime) {
988 ClientInfo* client_info = GetClientInfoFromLoader(loader); 988 ClientInfo* client_info = GetClientInfoFromLoader(loader);
989 if (client_info && client_info->client) { 989 if (client_info && client_info->client) {
990 MultiPartResponseHandlerMap::iterator index = 990 MultiPartResponseHandlerMap::iterator index =
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 webframe_->setReferrerForRequest(*request, plugin_url_); 1350 webframe_->setReferrerForRequest(*request, plugin_url_);
1351 break; 1351 break;
1352 1352
1353 default: 1353 default:
1354 break; 1354 break;
1355 } 1355 }
1356 } 1356 }
1357 1357
1358 } // namespace npapi 1358 } // namespace npapi
1359 } // namespace webkit 1359 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698