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

Side by Side Diff: content/worker/worker_webkitplatformsupport_impl.cc

Issue 20015002: Make Platform::queryStorageUsageAndQuota work from worker threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/worker/worker_webkitplatformsupport_impl.h" 5 #include "content/worker/worker_webkitplatformsupport_impl.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { 295 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() {
296 if (!blob_registry_.get() && thread_safe_sender_.get()) 296 if (!blob_registry_.get() && thread_safe_sender_.get())
297 blob_registry_.reset(new WebBlobRegistryImpl(thread_safe_sender_.get())); 297 blob_registry_.reset(new WebBlobRegistryImpl(thread_safe_sender_.get()));
298 return blob_registry_.get(); 298 return blob_registry_.get();
299 } 299 }
300 300
301 void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 301 void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
302 const WebKit::WebURL& storage_partition, 302 const WebKit::WebURL& storage_partition,
303 WebKit::WebStorageQuotaType type, 303 WebKit::WebStorageQuotaType type,
304 WebKit::WebStorageQuotaCallbacks* callbacks) { 304 WebKit::WebStorageQuotaCallbacks* callbacks) {
305 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( 305 QuotaDispatcher::ThreadSpecificInstance(
306 storage_partition, 306 thread_safe_sender_.get())->QueryStorageUsageAndQuota(
307 static_cast<quota::StorageType>(type), 307 storage_partition,
308 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 308 static_cast<quota::StorageType>(type),
309 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
309 } 310 }
310 311
311 } // namespace content 312 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698