| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/shared_worker/shared_worker_service_impl.h" | 5 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 const GURL& url, | 384 const GURL& url, |
| 385 const base::string16& name, | 385 const base::string16& name, |
| 386 const base::string16& display_name, | 386 const base::string16& display_name, |
| 387 unsigned long estimated_size, | 387 unsigned long estimated_size, |
| 388 bool* result, | 388 bool* result, |
| 389 SharedWorkerMessageFilter* filter) { | 389 SharedWorkerMessageFilter* filter) { |
| 390 if (SharedWorkerHost* host = FindSharedWorkerHost(filter, worker_route_id)) | 390 if (SharedWorkerHost* host = FindSharedWorkerHost(filter, worker_route_id)) |
| 391 host->AllowDatabase(url, name, display_name, estimated_size, result); | 391 host->AllowDatabase(url, name, display_name, estimated_size, result); |
| 392 } | 392 } |
| 393 | 393 |
| 394 void SharedWorkerServiceImpl::AllowFileSystem( | 394 void SharedWorkerServiceImpl::RequestFileSystemAccessSync( |
| 395 int worker_route_id, | 395 int worker_route_id, |
| 396 const GURL& url, | 396 const GURL& url, |
| 397 bool* result, | 397 IPC::Message* reply_msg, |
| 398 SharedWorkerMessageFilter* filter) { | 398 SharedWorkerMessageFilter* filter) { |
| 399 if (SharedWorkerHost* host = FindSharedWorkerHost(filter, worker_route_id)) | 399 if (SharedWorkerHost* host = FindSharedWorkerHost(filter, worker_route_id)) |
| 400 host->AllowFileSystem(url, result); | 400 host->RequestFileSystemAccessSync(url, reply_msg); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void SharedWorkerServiceImpl::AllowIndexedDB( | 403 void SharedWorkerServiceImpl::AllowIndexedDB( |
| 404 int worker_route_id, | 404 int worker_route_id, |
| 405 const GURL& url, | 405 const GURL& url, |
| 406 const base::string16& name, | 406 const base::string16& name, |
| 407 bool* result, | 407 bool* result, |
| 408 SharedWorkerMessageFilter* filter) { | 408 SharedWorkerMessageFilter* filter) { |
| 409 if (SharedWorkerHost* host = FindSharedWorkerHost(filter, worker_route_id)) | 409 if (SharedWorkerHost* host = FindSharedWorkerHost(filter, worker_route_id)) |
| 410 host->AllowIndexedDB(url, name, result); | 410 host->AllowIndexedDB(url, name, result); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 UpdateWorkerDependencyFunc new_func) { | 648 UpdateWorkerDependencyFunc new_func) { |
| 649 update_worker_dependency_ = new_func; | 649 update_worker_dependency_ = new_func; |
| 650 } | 650 } |
| 651 | 651 |
| 652 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( | 652 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( |
| 653 bool (*new_func)(int)) { | 653 bool (*new_func)(int)) { |
| 654 s_try_increment_worker_ref_count_ = new_func; | 654 s_try_increment_worker_ref_count_ = new_func; |
| 655 } | 655 } |
| 656 | 656 |
| 657 } // namespace content | 657 } // namespace content |
| OLD | NEW |