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

Side by Side Diff: content/renderer/pepper/pepper_url_loader_host.cc

Issue 1873783003: Convert //content/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/pepper/pepper_url_loader_host.h" 5 #include "content/renderer/pepper/pepper_url_loader_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
10 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 10 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 DCHECK(instance_object->document_loader() == this); 93 DCHECK(instance_object->document_loader() == this);
94 instance_object->set_document_loader(NULL); 94 instance_object->set_document_loader(NULL);
95 } 95 }
96 } 96 }
97 97
98 // There is a path whereby the destructor for the loader_ member can 98 // There is a path whereby the destructor for the loader_ member can
99 // invoke InstanceWasDeleted() upon this URLLoaderResource, thereby 99 // invoke InstanceWasDeleted() upon this URLLoaderResource, thereby
100 // re-entering the scoped_ptr destructor with the same scoped_ptr object 100 // re-entering the scoped_ptr destructor with the same scoped_ptr object
101 // via loader_.reset(). Be sure that loader_ is first NULL then destroy 101 // via loader_.reset(). Be sure that loader_ is first NULL then destroy
102 // the scoped_ptr. See http://crbug.com/159429. 102 // the scoped_ptr. See http://crbug.com/159429.
103 scoped_ptr<blink::WebURLLoader> for_destruction_only(loader_.release()); 103 std::unique_ptr<blink::WebURLLoader> for_destruction_only(loader_.release());
104 } 104 }
105 105
106 int32_t PepperURLLoaderHost::OnResourceMessageReceived( 106 int32_t PepperURLLoaderHost::OnResourceMessageReceived(
107 const IPC::Message& msg, 107 const IPC::Message& msg,
108 ppapi::host::HostMessageContext* context) { 108 ppapi::host::HostMessageContext* context) {
109 PPAPI_BEGIN_MESSAGE_MAP(PepperURLLoaderHost, msg) 109 PPAPI_BEGIN_MESSAGE_MAP(PepperURLLoaderHost, msg)
110 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_URLLoader_Open, 110 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_URLLoader_Open,
111 OnHostMsgOpen) 111 OnHostMsgOpen)
112 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_URLLoader_SetDeferLoading, 112 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_URLLoader_SetDeferLoading,
113 OnHostMsgSetDeferLoading) 113 OnHostMsgSetDeferLoading)
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 ppapi::proxy::ResourceMessageReplyParams params; 435 ppapi::proxy::ResourceMessageReplyParams params;
436 SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress( 436 SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress(
437 record_upload ? bytes_sent_ : -1, 437 record_upload ? bytes_sent_ : -1,
438 record_upload ? total_bytes_to_be_sent_ : -1, 438 record_upload ? total_bytes_to_be_sent_ : -1,
439 record_download ? bytes_received_ : -1, 439 record_download ? bytes_received_ : -1,
440 record_download ? total_bytes_to_be_received_ : -1)); 440 record_download ? total_bytes_to_be_received_ : -1));
441 } 441 }
442 } 442 }
443 443
444 } // namespace content 444 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_url_loader_host.h ('k') | content/renderer/pepper/pepper_video_capture_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698