| 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" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 233 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 234 StoragePartition* storage_partition = GetStoragePartition(); | 234 StoragePartition* storage_partition = GetStoragePartition(); |
| 235 storage_partition->ClearDataForOrigin( | 235 storage_partition->ClearDataForOrigin( |
| 236 // All (temporary) QuotaClient types. | 236 // All (temporary) QuotaClient types. |
| 237 StoragePartition::REMOVE_DATA_MASK_APPCACHE | | 237 StoragePartition::REMOVE_DATA_MASK_APPCACHE | |
| 238 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | | 238 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | |
| 239 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB | | 239 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB | |
| 240 StoragePartition::REMOVE_DATA_MASK_WEBSQL, | 240 StoragePartition::REMOVE_DATA_MASK_WEBSQL, |
| 241 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY, | 241 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY, |
| 242 GURL(origin), | 242 GURL(origin), |
| 243 storage_partition->GetURLRequestContext()); | 243 storage_partition->GetURLRequestContext(), |
| 244 base::Bind(&base::DoNothing)); |
| 244 } | 245 } |
| 245 | 246 |
| 246 void AwQuotaManagerBridgeImpl::GetOrigins( | 247 void AwQuotaManagerBridgeImpl::GetOrigins( |
| 247 JNIEnv* env, jobject object, jint callback_id) { | 248 JNIEnv* env, jobject object, jint callback_id) { |
| 248 RunOnUIThread(base::Bind(&AwQuotaManagerBridgeImpl::GetOriginsOnUiThread, | 249 RunOnUIThread(base::Bind(&AwQuotaManagerBridgeImpl::GetOriginsOnUiThread, |
| 249 this, | 250 this, |
| 250 callback_id)); | 251 callback_id)); |
| 251 } | 252 } |
| 252 | 253 |
| 253 void AwQuotaManagerBridgeImpl::GetOriginsOnUiThread(jint callback_id) { | 254 void AwQuotaManagerBridgeImpl::GetOriginsOnUiThread(jint callback_id) { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 348 |
| 348 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( | 349 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( |
| 349 env, obj.obj(), jcallback_id, is_quota, usage, quota); | 350 env, obj.obj(), jcallback_id, is_quota, usage, quota); |
| 350 } | 351 } |
| 351 | 352 |
| 352 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { | 353 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { |
| 353 return RegisterNativesImpl(env); | 354 return RegisterNativesImpl(env); |
| 354 } | 355 } |
| 355 | 356 |
| 356 } // namespace android_webview | 357 } // namespace android_webview |
| OLD | NEW |