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

Side by Side Diff: content/renderer/media/peer_connection_identity_store.cc

Issue 1461173002: Stop using rtc::scoped_ptr::Pass() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | content/renderer/media/rtc_certificate_generator.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/media/peer_connection_identity_store.h" 5 #include "content/renderer/media/peer_connection_identity_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_; 85 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
86 const scoped_refptr<base::SingleThreadTaskRunner> signaling_thread_; 86 const scoped_refptr<base::SingleThreadTaskRunner> signaling_thread_;
87 scoped_refptr<webrtc::DtlsIdentityRequestObserver> observer_; 87 scoped_refptr<webrtc::DtlsIdentityRequestObserver> observer_;
88 }; 88 };
89 89
90 // Helper function for PeerConnectionIdentityStore::RequestIdentity. 90 // Helper function for PeerConnectionIdentityStore::RequestIdentity.
91 // Used to invoke |observer|->OnSuccess in a PostTask. 91 // Used to invoke |observer|->OnSuccess in a PostTask.
92 void ObserverOnSuccess( 92 void ObserverOnSuccess(
93 const rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver>& observer, 93 const rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver>& observer,
94 scoped_ptr<rtc::SSLIdentity> identity) { 94 scoped_ptr<rtc::SSLIdentity> identity) {
95 rtc::scoped_ptr<rtc::SSLIdentity> rtc_scoped_ptr(identity.release()); 95 observer->OnSuccess(rtc::scoped_ptr<rtc::SSLIdentity>(identity.release()));
96 observer->OnSuccess(rtc_scoped_ptr.Pass());
97 } 96 }
98 97
99 } // namespace 98 } // namespace
100 99
101 PeerConnectionIdentityStore::PeerConnectionIdentityStore( 100 PeerConnectionIdentityStore::PeerConnectionIdentityStore(
102 const scoped_refptr<base::SingleThreadTaskRunner>& main_thread, 101 const scoped_refptr<base::SingleThreadTaskRunner>& main_thread,
103 const scoped_refptr<base::SingleThreadTaskRunner>& signaling_thread, 102 const scoped_refptr<base::SingleThreadTaskRunner>& signaling_thread,
104 const GURL& url, 103 const GURL& url,
105 const GURL& first_party_for_cookies) 104 const GURL& first_party_for_cookies)
106 : main_thread_(main_thread), 105 : main_thread_(main_thread),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } else { 155 } else {
157 // Async call to |observer|->OnFailure. 156 // Async call to |observer|->OnFailure.
158 signaling_thread_->PostTask(FROM_HERE, 157 signaling_thread_->PostTask(FROM_HERE,
159 base::Bind(&webrtc::DtlsIdentityRequestObserver::OnFailure, 158 base::Bind(&webrtc::DtlsIdentityRequestObserver::OnFailure,
160 observer, 0)); 159 observer, 0));
161 } 160 }
162 } 161 }
163 } 162 }
164 163
165 } // namespace content 164 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_certificate_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698