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

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

Issue 2496653002: Part 2 of base::IDMap refactor to eliminate IDMapOwnPointer/IDMapExternalPointer modes (Closed)
Patch Set: typedefs => using statements, update comments in base/id_map.h Created 4 years 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 | « android_webview/native/aw_contents_client_bridge.h ('k') | base/id_map.h » ('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 (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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/common/devtools_instrumentation.h" 10 #include "android_webview/common/devtools_instrumentation.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 AwContentsClientBridge::~AwContentsClientBridge() { 66 AwContentsClientBridge::~AwContentsClientBridge() {
67 JNIEnv* env = AttachCurrentThread(); 67 JNIEnv* env = AttachCurrentThread();
68 68
69 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 69 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
70 if (!obj.is_null()) { 70 if (!obj.is_null()) {
71 // Clear the weak reference from the java peer to the native object since 71 // Clear the weak reference from the java peer to the native object since
72 // it is possible that java object lifetime can exceed the AwContens. 72 // it is possible that java object lifetime can exceed the AwContens.
73 Java_AwContentsClientBridge_setNativeContentsClientBridge(env, obj, 0); 73 Java_AwContentsClientBridge_setNativeContentsClientBridge(env, obj, 0);
74 } 74 }
75 75
76 for (IDMap<content::ClientCertificateDelegate>::iterator iter( 76 for (IDMap<content::ClientCertificateDelegate*>::iterator iter(
77 &pending_client_cert_request_delegates_); 77 &pending_client_cert_request_delegates_);
78 !iter.IsAtEnd(); iter.Advance()) { 78 !iter.IsAtEnd(); iter.Advance()) {
79 delete iter.GetCurrentValue(); 79 delete iter.GetCurrentValue();
80 } 80 }
81 } 81 }
82 82
83 void AwContentsClientBridge::AllowCertificateError( 83 void AwContentsClientBridge::AllowCertificateError(
84 int cert_error, 84 int cert_error,
85 net::X509Certificate* cert, 85 net::X509Certificate* cert,
86 const GURL& request_url, 86 const GURL& request_url,
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 pending_client_cert_request_delegates_.Remove(request_id); 452 pending_client_cert_request_delegates_.Remove(request_id);
453 453
454 delete delegate; 454 delete delegate;
455 } 455 }
456 456
457 bool RegisterAwContentsClientBridge(JNIEnv* env) { 457 bool RegisterAwContentsClientBridge(JNIEnv* env) {
458 return RegisterNativesImpl(env); 458 return RegisterNativesImpl(env);
459 } 459 }
460 460
461 } // namespace android_webview 461 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents_client_bridge.h ('k') | base/id_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698