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

Side by Side Diff: remoting/client/plugin/pepper_url_request.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "remoting/client/plugin/pepper_url_request.h" 5 #include "remoting/client/plugin/pepper_url_request.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h"
9 #include "ppapi/cpp/url_response_info.h" 10 #include "ppapi/cpp/url_response_info.h"
10 11
11 // Read buffer we allocate per read when reading response from 12 // Read buffer we allocate per read when reading response from
12 // URLLoader. 13 // URLLoader.
13 static const int kReadSize = 1024; 14 static const int kReadSize = 1024;
14 15
15 namespace remoting { 16 namespace remoting {
16 17
17 PepperUrlRequest::PepperUrlRequest(pp::InstanceHandle pp_instance, 18 PepperUrlRequest::PepperUrlRequest(pp::InstanceHandle pp_instance,
18 UrlRequest::Type type, 19 UrlRequest::Type type,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 101 }
101 102
102 base::ResetAndReturn(&on_result_callback_) 103 base::ResetAndReturn(&on_result_callback_)
103 .Run(Result(url_loader_.GetResponseInfo().GetStatusCode(), response_)); 104 .Run(Result(url_loader_.GetResponseInfo().GetStatusCode(), response_));
104 } 105 }
105 106
106 PepperUrlRequestFactory::PepperUrlRequestFactory(pp::InstanceHandle pp_instance) 107 PepperUrlRequestFactory::PepperUrlRequestFactory(pp::InstanceHandle pp_instance)
107 : pp_instance_(pp_instance) {} 108 : pp_instance_(pp_instance) {}
108 PepperUrlRequestFactory::~PepperUrlRequestFactory() {} 109 PepperUrlRequestFactory::~PepperUrlRequestFactory() {}
109 110
110 scoped_ptr<UrlRequest> PepperUrlRequestFactory::CreateUrlRequest( 111 std::unique_ptr<UrlRequest> PepperUrlRequestFactory::CreateUrlRequest(
111 UrlRequest::Type type, 112 UrlRequest::Type type,
112 const std::string& url) { 113 const std::string& url) {
113 return make_scoped_ptr(new PepperUrlRequest(pp_instance_, type, url)); 114 return base::WrapUnique(new PepperUrlRequest(pp_instance_, type, url));
114 } 115 }
115 116
116 } // namespace remoting 117 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_url_request.h ('k') | remoting/client/plugin/pepper_video_renderer_2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698