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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 12091111: Implement Webviewclient.onReceivedSslError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_browser_main_parts.h" 7 #include "android_webview/browser/aw_browser_main_parts.h"
8 #include "android_webview/browser/aw_certificate_error_handler_base.h"
8 #include "android_webview/browser/aw_cookie_access_policy.h" 9 #include "android_webview/browser/aw_cookie_access_policy.h"
9 #include "android_webview/browser/aw_quota_permission_context.h" 10 #include "android_webview/browser/aw_quota_permission_context.h"
10 #include "android_webview/browser/net_disk_cache_remover.h" 11 #include "android_webview/browser/net_disk_cache_remover.h"
11 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h" 12 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h"
12 #include "android_webview/common/url_constants.h" 13 #include "android_webview/common/url_constants.h"
13 #include "base/android/locale_utils.h" 14 #include "base/android/locale_utils.h"
14 #include "base/base_paths_android.h" 15 #include "base/base_paths_android.h"
15 #include "base/path_service.h" 16 #include "base/path_service.h"
16 #include "content/public/browser/access_token_store.h" 17 #include "content/public/browser/access_token_store.h"
17 #include "content/public/browser/child_process_security_policy.h" 18 #include "content/public/browser/child_process_security_policy.h"
18 #include "content/public/browser/render_process_host.h" 19 #include "content/public/browser/render_process_host.h"
19 #include "content/public/browser/render_view_host.h" 20 #include "content/public/browser/render_view_host.h"
20 #include "content/public/common/url_constants.h" 21 #include "content/public/common/url_constants.h"
21 #include "grit/ui_resources.h" 22 #include "grit/ui_resources.h"
23 #include "net/base/ssl_info.h"
22 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
23 25
24 namespace { 26 namespace {
25 27
26 class DummyAccessTokenStore : public content::AccessTokenStore { 28 class DummyAccessTokenStore : public content::AccessTokenStore {
27 public: 29 public:
28 DummyAccessTokenStore() { } 30 DummyAccessTokenStore() { }
29 31
30 virtual void LoadAccessTokens( 32 virtual void LoadAccessTokens(
31 const LoadAccessTokensCallbackType& request) OVERRIDE { } 33 const LoadAccessTokensCallbackType& request) OVERRIDE { }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void AwContentBrowserClient::AllowCertificateError( 201 void AwContentBrowserClient::AllowCertificateError(
200 int render_process_id, 202 int render_process_id,
201 int render_view_id, 203 int render_view_id,
202 int cert_error, 204 int cert_error,
203 const net::SSLInfo& ssl_info, 205 const net::SSLInfo& ssl_info,
204 const GURL& request_url, 206 const GURL& request_url,
205 bool overridable, 207 bool overridable,
206 bool strict_enforcement, 208 bool strict_enforcement,
207 const base::Callback<void(bool)>& callback, 209 const base::Callback<void(bool)>& callback,
208 bool* cancel_request) { 210 bool* cancel_request) {
209 // TODO(boliu): Implement this to power WebViewClient.onReceivedSslError. 211
210 NOTIMPLEMENTED(); 212 AwCertificateErrorHandlerBase* error_handler =
211 *cancel_request = true; 213 AwCertificateErrorHandlerBase::FromID(render_process_id, render_view_id);
214 error_handler->AllowCertificateError(cert_error, ssl_info.cert, request_url,
215 callback, cancel_request);
212 } 216 }
213 217
214 WebKit::WebNotificationPresenter::Permission 218 WebKit::WebNotificationPresenter::Permission
215 AwContentBrowserClient::CheckDesktopNotificationPermission( 219 AwContentBrowserClient::CheckDesktopNotificationPermission(
216 const GURL& source_url, 220 const GURL& source_url,
217 content::ResourceContext* context, 221 content::ResourceContext* context,
218 int render_process_id) { 222 int render_process_id) {
219 // Android WebView does not support notifications, so return Denied here. 223 // Android WebView does not support notifications, so return Denied here.
220 return WebKit::WebNotificationPresenter::PermissionDenied; 224 return WebKit::WebNotificationPresenter::PermissionDenied;
221 } 225 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 331
328 bool AwContentBrowserClient::AllowPepperSocketAPI( 332 bool AwContentBrowserClient::AllowPepperSocketAPI(
329 content::BrowserContext* browser_context, 333 content::BrowserContext* browser_context,
330 const GURL& url, 334 const GURL& url,
331 const content::SocketPermissionRequest& params) { 335 const content::SocketPermissionRequest& params) {
332 NOTREACHED() << "Android WebView does not support plugins"; 336 NOTREACHED() << "Android WebView does not support plugins";
333 return false; 337 return false;
334 } 338 }
335 339
336 } // namespace android_webview 340 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698