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

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

Issue 188203003: Move webcrypto to child/ and add support to worker_webkitplatformsupport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "content/child/blink_glue.h" 12 #include "content/child/blink_glue.h"
13 #include "content/child/database_util.h" 13 #include "content/child/database_util.h"
14 #include "content/child/fileapi/webfilesystem_impl.h" 14 #include "content/child/fileapi/webfilesystem_impl.h"
15 #include "content/child/indexed_db/webidbfactory_impl.h" 15 #include "content/child/indexed_db/webidbfactory_impl.h"
16 #include "content/child/quota_dispatcher.h" 16 #include "content/child/quota_dispatcher.h"
17 #include "content/child/quota_message_filter.h" 17 #include "content/child/quota_message_filter.h"
18 #include "content/child/thread_safe_sender.h" 18 #include "content/child/thread_safe_sender.h"
19 #include "content/child/web_database_observer_impl.h" 19 #include "content/child/web_database_observer_impl.h"
20 #include "content/child/webblobregistry_impl.h" 20 #include "content/child/webblobregistry_impl.h"
21 #include "content/child/webcrypto/webcrypto_impl.h"
21 #include "content/child/webfileutilities_impl.h" 22 #include "content/child/webfileutilities_impl.h"
22 #include "content/child/webmessageportchannel_impl.h" 23 #include "content/child/webmessageportchannel_impl.h"
23 #include "content/common/file_utilities_messages.h" 24 #include "content/common/file_utilities_messages.h"
24 #include "content/common/mime_registry_messages.h" 25 #include "content/common/mime_registry_messages.h"
25 #include "content/worker/worker_thread.h" 26 #include "content/worker/worker_thread.h"
26 #include "ipc/ipc_sync_message_filter.h" 27 #include "ipc/ipc_sync_message_filter.h"
27 #include "net/base/mime_util.h" 28 #include "net/base/mime_util.h"
28 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" 29 #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
29 #include "third_party/WebKit/public/platform/WebFileInfo.h" 30 #include "third_party/WebKit/public/platform/WebFileInfo.h"
30 #include "third_party/WebKit/public/platform/WebString.h" 31 #include "third_party/WebKit/public/platform/WebString.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 new MimeRegistryMsg_GetMimeTypeFromFile( 291 new MimeRegistryMsg_GetMimeTypeFromFile(
291 base::FilePath::FromUTF16Unsafe(file_path), 292 base::FilePath::FromUTF16Unsafe(file_path),
292 &mime_type)); 293 &mime_type));
293 return base::ASCIIToUTF16(mime_type); 294 return base::ASCIIToUTF16(mime_type);
294 } 295 }
295 296
296 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { 297 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() {
297 return blob_registry_.get(); 298 return blob_registry_.get();
298 } 299 }
299 300
301 blink::WebCrypto* WorkerWebKitPlatformSupportImpl::crypto() {
302 if (!web_crypto_)
303 web_crypto_.reset(new WebCryptoImpl());
304 return web_crypto_.get();
305 }
306
300 void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 307 void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
301 const blink::WebURL& storage_partition, 308 const blink::WebURL& storage_partition,
302 blink::WebStorageQuotaType type, 309 blink::WebStorageQuotaType type,
303 blink::WebStorageQuotaCallbacks callbacks) { 310 blink::WebStorageQuotaCallbacks callbacks) {
304 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 311 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
305 return; 312 return;
306 QuotaDispatcher::ThreadSpecificInstance( 313 QuotaDispatcher::ThreadSpecificInstance(
307 thread_safe_sender_.get(), 314 thread_safe_sender_.get(),
308 quota_message_filter_.get())->QueryStorageUsageAndQuota( 315 quota_message_filter_.get())->QueryStorageUsageAndQuota(
309 storage_partition, 316 storage_partition,
310 static_cast<quota::StorageType>(type), 317 static_cast<quota::StorageType>(type),
311 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 318 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
312 } 319 }
313 320
314 } // namespace content 321 } // namespace content
OLDNEW
« content/child/webcrypto/crypto_data.h ('K') | « content/worker/worker_webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698