| OLD | NEW |
| 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 } | 644 } |
| 645 | 645 |
| 646 long long RendererBlinkPlatformImpl::databaseGetFileSize( | 646 long long RendererBlinkPlatformImpl::databaseGetFileSize( |
| 647 const WebString& vfs_file_name) { | 647 const WebString& vfs_file_name) { |
| 648 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name, | 648 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name, |
| 649 sync_message_filter_.get()); | 649 sync_message_filter_.get()); |
| 650 } | 650 } |
| 651 | 651 |
| 652 long long RendererBlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( | 652 long long RendererBlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( |
| 653 const blink::WebSecurityOrigin& origin) { | 653 const blink::WebSecurityOrigin& origin) { |
| 654 // TODO(jsbell): Pass url::Origin over IPC instead of database | 654 return DatabaseUtil::DatabaseGetSpaceAvailable(origin, |
| 655 // identifier/GURL. https://crbug.com/591482 | 655 sync_message_filter_.get()); |
| 656 return DatabaseUtil::DatabaseGetSpaceAvailable(WebString::fromUTF8( | |
| 657 storage::GetIdentifierFromOrigin(WebSecurityOriginToGURL(origin))), | |
| 658 sync_message_filter_.get()); | |
| 659 } | 656 } |
| 660 | 657 |
| 661 bool RendererBlinkPlatformImpl::databaseSetFileSize( | 658 bool RendererBlinkPlatformImpl::databaseSetFileSize( |
| 662 const WebString& vfs_file_name, long long size) { | 659 const WebString& vfs_file_name, long long size) { |
| 663 return DatabaseUtil::DatabaseSetFileSize( | 660 return DatabaseUtil::DatabaseSetFileSize( |
| 664 vfs_file_name, size, sync_message_filter_.get()); | 661 vfs_file_name, size, sync_message_filter_.get()); |
| 665 } | 662 } |
| 666 | 663 |
| 667 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier( | 664 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier( |
| 668 const blink::WebSecurityOrigin& origin) { | 665 const blink::WebSecurityOrigin& origin) { |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 return &trial_token_validator_; | 1332 return &trial_token_validator_; |
| 1336 } | 1333 } |
| 1337 | 1334 |
| 1338 void RendererBlinkPlatformImpl::workerContextCreated( | 1335 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1339 const v8::Local<v8::Context>& worker) { | 1336 const v8::Local<v8::Context>& worker) { |
| 1340 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1337 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1341 worker); | 1338 worker); |
| 1342 } | 1339 } |
| 1343 | 1340 |
| 1344 } // namespace content | 1341 } // namespace content |
| OLD | NEW |