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

Side by Side Diff: android_webview/native/aw_contents_client_bridge.cc

Issue 1852513003: Convert //android_webview to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git is hard 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 "android_webview/native/aw_contents_client_bridge.h" 5 #include "android_webview/native/aw_contents_client_bridge.h"
6 6
7 #include "android_webview/common/devtools_instrumentation.h" 7 #include "android_webview/common/devtools_instrumentation.h"
8 #include "android_webview/native/aw_contents.h" 8 #include "android_webview/native/aw_contents.h"
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return; 120 return;
121 } 121 }
122 callback->Run(proceed); 122 callback->Run(proceed);
123 pending_cert_error_callbacks_.Remove(id); 123 pending_cert_error_callbacks_.Remove(id);
124 } 124 }
125 125
126 // This method is inspired by SelectClientCertificate() in 126 // This method is inspired by SelectClientCertificate() in
127 // chrome/browser/ui/android/ssl_client_certificate_request.cc 127 // chrome/browser/ui/android/ssl_client_certificate_request.cc
128 void AwContentsClientBridge::SelectClientCertificate( 128 void AwContentsClientBridge::SelectClientCertificate(
129 net::SSLCertRequestInfo* cert_request_info, 129 net::SSLCertRequestInfo* cert_request_info,
130 scoped_ptr<content::ClientCertificateDelegate> delegate) { 130 std::unique_ptr<content::ClientCertificateDelegate> delegate) {
131 DCHECK_CURRENTLY_ON(BrowserThread::UI); 131 DCHECK_CURRENTLY_ON(BrowserThread::UI);
132 132
133 // Add the callback to id map. 133 // Add the callback to id map.
134 int request_id = 134 int request_id =
135 pending_client_cert_request_delegates_.Add(delegate.release()); 135 pending_client_cert_request_delegates_.Add(delegate.release());
136 // Make sure callback is run on error. 136 // Make sure callback is run on error.
137 base::ScopedClosureRunner guard(base::Bind( 137 base::ScopedClosureRunner guard(base::Bind(
138 &AwContentsClientBridge::HandleErrorInClientCertificateResponse, 138 &AwContentsClientBridge::HandleErrorInClientCertificateResponse,
139 base::Unretained(this), 139 base::Unretained(this),
140 request_id)); 140 request_id));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 pending_client_cert_request_delegates_.Remove(request_id); 401 pending_client_cert_request_delegates_.Remove(request_id);
402 402
403 delete delegate; 403 delete delegate;
404 } 404 }
405 405
406 bool RegisterAwContentsClientBridge(JNIEnv* env) { 406 bool RegisterAwContentsClientBridge(JNIEnv* env) {
407 return RegisterNativesImpl(env); 407 return RegisterNativesImpl(env);
408 } 408 }
409 409
410 } // namespace android_webview 410 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents_client_bridge.h ('k') | android_webview/native/aw_contents_client_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698