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

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

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: most unittests pass Created 7 years, 4 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 StoragePartition::kLocalDomStorage | 194 StoragePartition::kLocalDomStorage |
195 StoragePartition::kSessionDomStorage); 195 StoragePartition::kSessionDomStorage);
196 } 196 }
197 197
198 void AwQuotaManagerBridgeImpl::DeleteOrigin( 198 void AwQuotaManagerBridgeImpl::DeleteOrigin(
199 JNIEnv* env, jobject object, jstring origin) { 199 JNIEnv* env, jobject object, jstring origin) {
200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
201 StoragePartition* storage_partition = GetStoragePartition(); 201 StoragePartition* storage_partition = GetStoragePartition();
202 storage_partition->AsyncClearDataForOrigin( 202 storage_partition->AsyncClearDataForOrigin(
203 StoragePartition::kQuotaManagedTemporaryStorage, 203 StoragePartition::kQuotaManagedTemporaryStorage,
204 GURL(base::android::ConvertJavaStringToUTF16(env, origin)), 204 GURL(base::android::ConvertJavaStringToUTF16(env, origin)));
205 storage_partition->GetURLRequestContext());
206 } 205 }
207 206
208 void AwQuotaManagerBridgeImpl::GetOrigins( 207 void AwQuotaManagerBridgeImpl::GetOrigins(
209 JNIEnv* env, jobject object, jint callback_id) { 208 JNIEnv* env, jobject object, jint callback_id) {
210 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 209 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
211 210
212 const GetOriginsCallback ui_callback = base::Bind( 211 const GetOriginsCallback ui_callback = base::Bind(
213 &AwQuotaManagerBridgeImpl::GetOriginsCallbackImpl, 212 &AwQuotaManagerBridgeImpl::GetOriginsCallbackImpl,
214 weak_factory_.GetWeakPtr(), 213 weak_factory_.GetWeakPtr(),
215 callback_id); 214 callback_id);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 288
290 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( 289 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback(
291 env, obj.obj(), jcallback_id, is_quota, usage, quota); 290 env, obj.obj(), jcallback_id, is_quota, usage, quota);
292 } 291 }
293 292
294 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { 293 bool RegisterAwQuotaManagerBridge(JNIEnv* env) {
295 return RegisterNativesImpl(env) >= 0; 294 return RegisterNativesImpl(env) >= 0;
296 } 295 }
297 296
298 } // namespace android_webview 297 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698