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

Side by Side Diff: ppapi/proxy/ppb_url_loader_proxy.cc

Issue 8682022: ppapi/proxy: Fix a bug in OnMsgFinishStreamingToFile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/ppb_url_loader_proxy.h" 5 #include "ppapi/proxy/ppb_url_loader_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 enter.SetResult(enter.object()->ReadResponseBody( 536 enter.SetResult(enter.object()->ReadResponseBody(
537 const_cast<char*>(info->read_buffer.c_str()), 537 const_cast<char*>(info->read_buffer.c_str()),
538 bytes_to_read, enter.callback())); 538 bytes_to_read, enter.callback()));
539 } 539 }
540 } 540 }
541 541
542 void PPB_URLLoader_Proxy::OnMsgFinishStreamingToFile( 542 void PPB_URLLoader_Proxy::OnMsgFinishStreamingToFile(
543 const HostResource& loader) { 543 const HostResource& loader) {
544 EnterHostFromHostResourceForceCallback<PPB_URLLoader_API> enter( 544 EnterHostFromHostResourceForceCallback<PPB_URLLoader_API> enter(
545 loader, callback_factory_, &PPB_URLLoader_Proxy::OnCallback, loader); 545 loader, callback_factory_, &PPB_URLLoader_Proxy::OnCallback, loader);
546 if (enter.failed()) 546 if (enter.succeeded())
547 enter.SetResult(enter.object()->FinishStreamingToFile(enter.callback()));; 547 enter.SetResult(enter.object()->FinishStreamingToFile(enter.callback()));;
548 } 548 }
549 549
550 void PPB_URLLoader_Proxy::OnMsgClose(const HostResource& loader) { 550 void PPB_URLLoader_Proxy::OnMsgClose(const HostResource& loader) {
551 EnterHostFromHostResource<PPB_URLLoader_API> enter(loader); 551 EnterHostFromHostResource<PPB_URLLoader_API> enter(loader);
552 if (enter.succeeded()) 552 if (enter.succeeded())
553 enter.object()->Close(); 553 enter.object()->Close();
554 } 554 }
555 555
556 void PPB_URLLoader_Proxy::OnMsgGrantUniversalAccess( 556 void PPB_URLLoader_Proxy::OnMsgGrantUniversalAccess(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } 601 }
602 602
603 void PPB_URLLoader_Proxy::OnCallback(int32_t result, 603 void PPB_URLLoader_Proxy::OnCallback(int32_t result,
604 const HostResource& resource) { 604 const HostResource& resource) {
605 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete( 605 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete(
606 API_ID_PPB_URL_LOADER, resource, result)); 606 API_ID_PPB_URL_LOADER, resource, result));
607 } 607 }
608 608
609 } // namespace proxy 609 } // namespace proxy
610 } // namespace ppapi 610 } // namespace ppapi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698