OLD | NEW |
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 "components/web_restrictions/browser/web_restrictions_client.h" | 5 #include "components/web_restrictions/browser/web_restrictions_client.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "jni/WebRestrictionsClient_jni.h" | 12 #include "jni/WebRestrictionsClient_jni.h" |
13 | 13 |
14 using base::android::ScopedJavaGlobalRef; | 14 using base::android::ScopedJavaGlobalRef; |
15 | 15 |
16 namespace web_restrictions { | 16 namespace web_restrictions { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const size_t kMaxCacheSize = 100; | 20 const size_t kMaxCacheSize = 100; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 JNIEnv* env, | 257 JNIEnv* env, |
258 const base::android::JavaParamRef<jobject>& clazz, | 258 const base::android::JavaParamRef<jobject>& clazz, |
259 jlong provider_ptr) { | 259 jlong provider_ptr) { |
260 WebRestrictionsClient* provider = | 260 WebRestrictionsClient* provider = |
261 reinterpret_cast<WebRestrictionsClient*>(provider_ptr); | 261 reinterpret_cast<WebRestrictionsClient*>(provider_ptr); |
262 // TODO(knn): Also reload existing interstitials/error pages. | 262 // TODO(knn): Also reload existing interstitials/error pages. |
263 provider->OnWebRestrictionsChanged(); | 263 provider->OnWebRestrictionsChanged(); |
264 } | 264 } |
265 | 265 |
266 } // namespace web_restrictions | 266 } // namespace web_restrictions |
OLD | NEW |