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

Side by Side Diff: trunk/src/android_webview/native/aw_quota_manager_bridge_impl.cc

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 JNIEnv* env, jobject object, jstring origin) { 201 JNIEnv* env, jobject object, jstring origin) {
202 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 202 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
203 StoragePartition* storage_partition = GetStoragePartition(); 203 StoragePartition* storage_partition = GetStoragePartition();
204 storage_partition->ClearDataForOrigin( 204 storage_partition->ClearDataForOrigin(
205 // All (temporary) QuotaClient types. 205 // All (temporary) QuotaClient types.
206 StoragePartition::REMOVE_DATA_MASK_APPCACHE | 206 StoragePartition::REMOVE_DATA_MASK_APPCACHE |
207 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS | 207 StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS |
208 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB | 208 StoragePartition::REMOVE_DATA_MASK_INDEXEDDB |
209 StoragePartition::REMOVE_DATA_MASK_WEBSQL, 209 StoragePartition::REMOVE_DATA_MASK_WEBSQL,
210 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY, 210 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY,
211 GURL(base::android::ConvertJavaStringToUTF16(env, origin))); 211 GURL(base::android::ConvertJavaStringToUTF16(env, origin)),
212 storage_partition->GetURLRequestContext());
212 } 213 }
213 214
214 void AwQuotaManagerBridgeImpl::GetOrigins( 215 void AwQuotaManagerBridgeImpl::GetOrigins(
215 JNIEnv* env, jobject object, jint callback_id) { 216 JNIEnv* env, jobject object, jint callback_id) {
216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
217 218
218 const GetOriginsCallback ui_callback = base::Bind( 219 const GetOriginsCallback ui_callback = base::Bind(
219 &AwQuotaManagerBridgeImpl::GetOriginsCallbackImpl, 220 &AwQuotaManagerBridgeImpl::GetOriginsCallbackImpl,
220 weak_factory_.GetWeakPtr(), 221 weak_factory_.GetWeakPtr(),
221 callback_id); 222 callback_id);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 296
296 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( 297 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback(
297 env, obj.obj(), jcallback_id, is_quota, usage, quota); 298 env, obj.obj(), jcallback_id, is_quota, usage, quota);
298 } 299 }
299 300
300 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { 301 bool RegisterAwQuotaManagerBridge(JNIEnv* env) {
301 return RegisterNativesImpl(env) >= 0; 302 return RegisterNativesImpl(env) >= 0;
302 } 303 }
303 304
304 } // namespace android_webview 305 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698