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

Side by Side Diff: trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 21039004: Revert 214172 "Revert 214162 "Make Platform::queryStorageUsageAn..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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) 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/renderer/renderer_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/message_loop/message_loop_proxy.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "base/safe_numerics.h" 14 #include "base/safe_numerics.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "content/child/database_util.h" 17 #include "content/child/database_util.h"
18 #include "content/child/fileapi/webfilesystem_impl.h" 18 #include "content/child/fileapi/webfilesystem_impl.h"
19 #include "content/child/indexed_db/proxy_webidbfactory_impl.h" 19 #include "content/child/indexed_db/proxy_webidbfactory_impl.h"
20 #include "content/child/npapi/npobject_util.h" 20 #include "content/child/npapi/npobject_util.h"
21 #include "content/child/quota_dispatcher.h" 21 #include "content/child/quota_dispatcher.h"
22 #include "content/child/quota_message_filter.h"
22 #include "content/child/thread_safe_sender.h" 23 #include "content/child/thread_safe_sender.h"
23 #include "content/child/webblobregistry_impl.h" 24 #include "content/child/webblobregistry_impl.h"
24 #include "content/child/webmessageportchannel_impl.h" 25 #include "content/child/webmessageportchannel_impl.h"
25 #include "content/common/file_utilities_messages.h" 26 #include "content/common/file_utilities_messages.h"
26 #include "content/common/gpu/client/context_provider_command_buffer.h" 27 #include "content/common/gpu/client/context_provider_command_buffer.h"
27 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 28 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
28 #include "content/common/mime_registry_messages.h" 29 #include "content/common/mime_registry_messages.h"
29 #include "content/common/view_messages.h" 30 #include "content/common/view_messages.h"
30 #include "content/public/common/content_switches.h" 31 #include "content/public/common/content_switches.h"
31 #include "content/public/common/webplugininfo.h" 32 #include "content/public/common/webplugininfo.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 sandbox_support_.reset( 235 sandbox_support_.reset(
235 new RendererWebKitPlatformSupportImpl::SandboxSupport); 236 new RendererWebKitPlatformSupportImpl::SandboxSupport);
236 } else { 237 } else {
237 DVLOG(1) << "Disabling sandbox support for testing."; 238 DVLOG(1) << "Disabling sandbox support for testing.";
238 } 239 }
239 240
240 // ChildThread may not exist in some tests. 241 // ChildThread may not exist in some tests.
241 if (ChildThread::current()) { 242 if (ChildThread::current()) {
242 sync_message_filter_ = ChildThread::current()->sync_message_filter(); 243 sync_message_filter_ = ChildThread::current()->sync_message_filter();
243 thread_safe_sender_ = ChildThread::current()->thread_safe_sender(); 244 thread_safe_sender_ = ChildThread::current()->thread_safe_sender();
245 quota_message_filter_ = ChildThread::current()->quota_message_filter();
244 } 246 }
245 } 247 }
246 248
247 RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { 249 RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() {
248 } 250 }
249 251
250 //------------------------------------------------------------------------------ 252 //------------------------------------------------------------------------------
251 253
252 WebKit::WebClipboard* RendererWebKitPlatformSupportImpl::clipboard() { 254 WebKit::WebClipboard* RendererWebKitPlatformSupportImpl::clipboard() {
253 WebKit::WebClipboard* clipboard = 255 WebKit::WebClipboard* clipboard =
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1143 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1142 } 1144 }
1143 #endif // defined(OS_ANDROID) 1145 #endif // defined(OS_ANDROID)
1144 1146
1145 //------------------------------------------------------------------------------ 1147 //------------------------------------------------------------------------------
1146 1148
1147 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1149 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1148 const WebKit::WebURL& storage_partition, 1150 const WebKit::WebURL& storage_partition,
1149 WebKit::WebStorageQuotaType type, 1151 WebKit::WebStorageQuotaType type,
1150 WebKit::WebStorageQuotaCallbacks* callbacks) { 1152 WebKit::WebStorageQuotaCallbacks* callbacks) {
1151 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( 1153 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1152 storage_partition, 1154 return;
1153 static_cast<quota::StorageType>(type), 1155 QuotaDispatcher::ThreadSpecificInstance(
1154 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1156 thread_safe_sender_.get(),
1157 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1158 storage_partition,
1159 static_cast<quota::StorageType>(type),
1160 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1155 } 1161 }
1156 1162
1157 } // namespace content 1163 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/renderer/renderer_webkitplatformsupport_impl.h ('k') | trunk/src/content/worker/worker_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698