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

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

Issue 2814593002: WebView: add {set,get}SafeBrowsingEnabled per WebView (Closed)
Patch Set: Add comment about getSafeBrowsingEnabled() Created 3 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 | « android_webview/native/aw_contents_io_thread_client_impl.h ('k') | no next file » | 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) 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/native/aw_contents_io_thread_client_impl.h" 5 #include "android_webview/native/aw_contents_io_thread_client_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 bool AwContentsIoThreadClientImpl::ShouldAcceptThirdPartyCookies() const { 387 bool AwContentsIoThreadClientImpl::ShouldAcceptThirdPartyCookies() const {
388 DCHECK_CURRENTLY_ON(BrowserThread::IO); 388 DCHECK_CURRENTLY_ON(BrowserThread::IO);
389 if (java_object_.is_null()) 389 if (java_object_.is_null())
390 return false; 390 return false;
391 391
392 JNIEnv* env = AttachCurrentThread(); 392 JNIEnv* env = AttachCurrentThread();
393 return Java_AwContentsIoThreadClient_shouldAcceptThirdPartyCookies( 393 return Java_AwContentsIoThreadClient_shouldAcceptThirdPartyCookies(
394 env, java_object_); 394 env, java_object_);
395 } 395 }
396 396
397 bool AwContentsIoThreadClientImpl::GetSafeBrowsingEnabled() const {
398 DCHECK_CURRENTLY_ON(BrowserThread::IO);
399 if (java_object_.is_null())
400 return false;
401
402 JNIEnv* env = AttachCurrentThread();
403 return Java_AwContentsIoThreadClient_getSafeBrowsingEnabled(env,
404 java_object_);
405 }
406
397 bool AwContentsIoThreadClientImpl::ShouldBlockNetworkLoads() const { 407 bool AwContentsIoThreadClientImpl::ShouldBlockNetworkLoads() const {
398 DCHECK_CURRENTLY_ON(BrowserThread::IO); 408 DCHECK_CURRENTLY_ON(BrowserThread::IO);
399 if (java_object_.is_null()) 409 if (java_object_.is_null())
400 return false; 410 return false;
401 411
402 JNIEnv* env = AttachCurrentThread(); 412 JNIEnv* env = AttachCurrentThread();
403 return Java_AwContentsIoThreadClient_shouldBlockNetworkLoads(env, 413 return Java_AwContentsIoThreadClient_shouldBlockNetworkLoads(env,
404 java_object_); 414 java_object_);
405 } 415 }
406 416
407 } // namespace android_webview 417 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents_io_thread_client_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698