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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1779413002: Remove Blink's DatabaseIdentifier implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded include Created 4 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
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_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 return new WebServiceWorkerCacheStorageImpl( 440 return new WebServiceWorkerCacheStorageImpl(
441 thread_safe_sender_.get(), WebSecurityOriginToGURL(security_origin)); 441 thread_safe_sender_.get(), WebSecurityOriginToGURL(security_origin));
442 } 442 }
443 443
444 //------------------------------------------------------------------------------ 444 //------------------------------------------------------------------------------
445 445
446 WebFileSystem* RendererBlinkPlatformImpl::fileSystem() { 446 WebFileSystem* RendererBlinkPlatformImpl::fileSystem() {
447 return WebFileSystemImpl::ThreadSpecificInstance(default_task_runner_); 447 return WebFileSystemImpl::ThreadSpecificInstance(default_task_runner_);
448 } 448 }
449 449
450 WebString RendererBlinkPlatformImpl::fileSystemCreateOriginIdentifier(
451 const blink::WebSecurityOrigin& origin) {
452 return WebString::fromUTF8(storage::GetIdentifierFromOrigin(
453 WebSecurityOriginToGURL(origin)));
454 }
455
450 //------------------------------------------------------------------------------ 456 //------------------------------------------------------------------------------
451 457
452 WebMimeRegistry::SupportsType 458 WebMimeRegistry::SupportsType
453 RendererBlinkPlatformImpl::MimeRegistry::supportsMediaMIMEType( 459 RendererBlinkPlatformImpl::MimeRegistry::supportsMediaMIMEType(
454 const WebString& mime_type, 460 const WebString& mime_type,
455 const WebString& codecs) { 461 const WebString& codecs) {
456 const std::string mime_type_ascii = ToASCIIOrEmpty(mime_type); 462 const std::string mime_type_ascii = ToASCIIOrEmpty(mime_type);
457 463
458 std::vector<std::string> codec_vector; 464 std::vector<std::string> codec_vector;
459 media::ParseCodecString(ToASCIIOrEmpty(codecs), &codec_vector, false); 465 media::ParseCodecString(ToASCIIOrEmpty(codecs), &codec_vector, false);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 sync_message_filter_.get()); 606 sync_message_filter_.get());
601 } 607 }
602 608
603 long long RendererBlinkPlatformImpl::databaseGetFileSize( 609 long long RendererBlinkPlatformImpl::databaseGetFileSize(
604 const WebString& vfs_file_name) { 610 const WebString& vfs_file_name) {
605 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name, 611 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name,
606 sync_message_filter_.get()); 612 sync_message_filter_.get());
607 } 613 }
608 614
609 long long RendererBlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( 615 long long RendererBlinkPlatformImpl::databaseGetSpaceAvailableForOrigin(
610 const WebString& origin_identifier) { 616 const blink::WebSecurityOrigin& origin) {
611 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier, 617 // TODO(jsbell): Pass url::Origin over IPC instead of database
612 sync_message_filter_.get()); 618 // identifier/GURL. https://crbug.com/591482
619 return DatabaseUtil::DatabaseGetSpaceAvailable(WebString::fromUTF8(
620 storage::GetIdentifierFromOrigin(WebSecurityOriginToGURL(origin))),
621 sync_message_filter_.get());
613 } 622 }
614 623
615 bool RendererBlinkPlatformImpl::databaseSetFileSize( 624 bool RendererBlinkPlatformImpl::databaseSetFileSize(
616 const WebString& vfs_file_name, long long size) { 625 const WebString& vfs_file_name, long long size) {
617 return DatabaseUtil::DatabaseSetFileSize( 626 return DatabaseUtil::DatabaseSetFileSize(
618 vfs_file_name, size, sync_message_filter_.get()); 627 vfs_file_name, size, sync_message_filter_.get());
619 } 628 }
620 629
630 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier(
631 const blink::WebSecurityOrigin& origin) {
632 return WebString::fromUTF8(storage::GetIdentifierFromOrigin(
633 WebSecurityOriginToGURL(origin)));
634 }
635
621 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { 636 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() {
622 RenderThreadImpl* thread = RenderThreadImpl::current(); 637 RenderThreadImpl* thread = RenderThreadImpl::current();
623 GpuChannelHost* host = thread->EstablishGpuChannelSync( 638 GpuChannelHost* host = thread->EstablishGpuChannelSync(
624 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); 639 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D);
625 if (!host) 640 if (!host)
626 return false; 641 return false;
627 642
628 return host->gpu_info().SupportsAccelerated2dCanvas(); 643 return host->gpu_info().SupportsAccelerated2dCanvas();
629 } 644 }
630 645
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 } 1279 }
1265 1280
1266 //------------------------------------------------------------------------------ 1281 //------------------------------------------------------------------------------
1267 1282
1268 blink::WebTrialTokenValidator* 1283 blink::WebTrialTokenValidator*
1269 RendererBlinkPlatformImpl::trialTokenValidator() { 1284 RendererBlinkPlatformImpl::trialTokenValidator() {
1270 return &trial_token_validator_; 1285 return &trial_token_validator_;
1271 } 1286 }
1272 1287
1273 } // namespace content 1288 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698