| OLD | NEW |
| 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_quota_manager_bridge_impl.h" | 5 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
| 10 #include "android_webview/browser/aw_content_browser_client.h" | 10 #include "android_webview/browser/aw_content_browser_client.h" |
| 11 #include "base/android/jni_array.h" | 11 #include "base/android/jni_array.h" |
| 12 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
| 13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/storage_partition.h" | 15 #include "content/public/browser/storage_partition.h" |
| 16 #include "content/public/common/content_client.h" | 16 #include "content/public/common/content_client.h" |
| 17 #include "jni/AwQuotaManagerBridge_jni.h" | 17 #include "jni/AwQuotaManagerBridge_jni.h" |
| 18 #include "storage/browser/quota/quota_manager.h" | 18 #include "storage/browser/quota/quota_manager.h" |
| 19 #include "storage/common/quota/quota_types.h" | 19 #include "storage/common/quota/quota_types.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 using base::android::AttachCurrentThread; | 22 using base::android::AttachCurrentThread; |
| 23 using base::android::JavaParamRef; |
| 24 using base::android::ScopedJavaLocalRef; |
| 23 using content::BrowserThread; | 25 using content::BrowserThread; |
| 24 using content::StoragePartition; | 26 using content::StoragePartition; |
| 25 using storage::QuotaClient; | 27 using storage::QuotaClient; |
| 26 using storage::QuotaManager; | 28 using storage::QuotaManager; |
| 27 | 29 |
| 28 namespace android_webview { | 30 namespace android_webview { |
| 29 | 31 |
| 30 namespace { | 32 namespace { |
| 31 | 33 |
| 32 // This object lives on UI and IO threads. Care need to be taken to make sure | 34 // This object lives on UI and IO threads. Care need to be taken to make sure |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 361 |
| 360 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( | 362 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( |
| 361 env, obj.obj(), jcallback_id, is_quota, usage, quota); | 363 env, obj.obj(), jcallback_id, is_quota, usage, quota); |
| 362 } | 364 } |
| 363 | 365 |
| 364 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { | 366 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { |
| 365 return RegisterNativesImpl(env); | 367 return RegisterNativesImpl(env); |
| 366 } | 368 } |
| 367 | 369 |
| 368 } // namespace android_webview | 370 } // namespace android_webview |
| OLD | NEW |