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

Side by Side Diff: webkit/plugins/ppapi/ppb_flash_impl.cc

Issue 6228004: Fix Pepper File IO callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 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
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/ppapi/ppb_flash_impl.h" 5 #include "webkit/plugins/ppapi/ppb_flash_impl.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 if (local_addr_out_) 415 if (local_addr_out_)
416 *local_addr_out_ = local_addr; 416 *local_addr_out_ = local_addr;
417 if (remote_addr_out_) 417 if (remote_addr_out_)
418 *remote_addr_out_ = remote_addr; 418 *remote_addr_out_ = remote_addr;
419 rv = PP_OK; 419 rv = PP_OK;
420 } else { 420 } else {
421 rv = PP_ERROR_FAILED; 421 rv = PP_ERROR_FAILED;
422 } 422 }
423 } 423 }
424 424
425 callback_->Run(rv); // Will complete abortively if necessary. 425 // Theoretically, the plugin should be allowed to try another |ConnectTcp()|
426 426 // from the callback.
427 // Wipe everything out for safety. 427 scoped_refptr<TrackedCompletionCallback> callback;
428 callback_ = NULL; 428 callback.swap(callback_);
429 // Wipe everything else out for safety.
429 socket_out_ = NULL; 430 socket_out_ = NULL;
430 local_addr_out_ = NULL; 431 local_addr_out_ = NULL;
431 remote_addr_out_ = NULL; 432 remote_addr_out_ = NULL;
433
434 callback->Run(rv); // Will complete abortively if necessary.
432 } 435 }
433 436
434 } // namespace ppapi 437 } // namespace ppapi
435 } // namespace webkit 438 } // namespace webkit
OLDNEW
« webkit/plugins/ppapi/ppb_file_io_impl.h ('K') | « webkit/plugins/ppapi/ppb_file_io_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698