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

Side by Side Diff: remoting/base/chromium_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
« no previous file with comments | « remoting/base/chromium_url_request.h ('k') | remoting/base/compound_buffer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base/chromium_url_request.h" 5 #include "remoting/base/chromium_url_request.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/memory/ptr_util.h"
8 #include "net/url_request/url_fetcher.h" 9 #include "net/url_request/url_fetcher.h"
9 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
10 11
11 namespace remoting { 12 namespace remoting {
12 13
13 ChromiumUrlRequest::ChromiumUrlRequest( 14 ChromiumUrlRequest::ChromiumUrlRequest(
14 scoped_refptr<net::URLRequestContextGetter> url_context, 15 scoped_refptr<net::URLRequestContextGetter> url_context,
15 UrlRequest::Type type, 16 UrlRequest::Type type,
16 const std::string& url) { 17 const std::string& url) {
17 net::URLFetcher::RequestType request_type = net::URLFetcher::GET; 18 net::URLFetcher::RequestType request_type = net::URLFetcher::GET;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 DCHECK(!on_result_callback_.is_null()); 62 DCHECK(!on_result_callback_.is_null());
62 base::ResetAndReturn(&on_result_callback_).Run(result); 63 base::ResetAndReturn(&on_result_callback_).Run(result);
63 } 64 }
64 65
65 ChromiumUrlRequestFactory::ChromiumUrlRequestFactory( 66 ChromiumUrlRequestFactory::ChromiumUrlRequestFactory(
66 scoped_refptr<net::URLRequestContextGetter> url_context) 67 scoped_refptr<net::URLRequestContextGetter> url_context)
67 : url_context_(url_context) {} 68 : url_context_(url_context) {}
68 ChromiumUrlRequestFactory::~ChromiumUrlRequestFactory() {} 69 ChromiumUrlRequestFactory::~ChromiumUrlRequestFactory() {}
69 70
70 scoped_ptr<UrlRequest> ChromiumUrlRequestFactory::CreateUrlRequest( 71 std::unique_ptr<UrlRequest> ChromiumUrlRequestFactory::CreateUrlRequest(
71 UrlRequest::Type type, 72 UrlRequest::Type type,
72 const std::string& url) { 73 const std::string& url) {
73 return make_scoped_ptr(new ChromiumUrlRequest(url_context_, type, url)); 74 return base::WrapUnique(new ChromiumUrlRequest(url_context_, type, url));
74 } 75 }
75 76
76 } // namespace remoting 77 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/chromium_url_request.h ('k') | remoting/base/compound_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698