OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/dom_storage/dom_storage_context_wrapper.h" | 5 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 void DOMStorageContextWrapper::GetSessionStorageUsage( | 311 void DOMStorageContextWrapper::GetSessionStorageUsage( |
312 const GetSessionStorageUsageCallback& callback) { | 312 const GetSessionStorageUsageCallback& callback) { |
313 DCHECK(context_.get()); | 313 DCHECK(context_.get()); |
314 context_->task_runner()->PostShutdownBlockingTask( | 314 context_->task_runner()->PostShutdownBlockingTask( |
315 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 315 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
316 base::Bind(&GetSessionStorageUsageHelper, | 316 base::Bind(&GetSessionStorageUsageHelper, |
317 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), | 317 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), |
318 base::RetainedRef(context_), callback)); | 318 base::RetainedRef(context_), callback)); |
319 } | 319 } |
320 | 320 |
| 321 void DOMStorageContextWrapper::DeleteLocalStorageForPhysicalOrigin( |
| 322 const GURL& origin) { |
| 323 DCHECK(context_.get()); |
| 324 context_->task_runner()->PostShutdownBlockingTask( |
| 325 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| 326 base::Bind(&DOMStorageContextImpl::DeleteLocalStorageForPhysicalOrigin, |
| 327 context_, origin)); |
| 328 } |
| 329 |
321 void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { | 330 void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { |
322 DCHECK(context_.get()); | 331 DCHECK(context_.get()); |
323 context_->task_runner()->PostShutdownBlockingTask( | 332 context_->task_runner()->PostShutdownBlockingTask( |
324 FROM_HERE, | 333 FROM_HERE, |
325 DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 334 DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
326 base::Bind(&DOMStorageContextImpl::DeleteLocalStorage, context_, origin)); | 335 base::Bind(&DOMStorageContextImpl::DeleteLocalStorage, context_, origin)); |
327 } | 336 } |
328 | 337 |
329 void DOMStorageContextWrapper::DeleteSessionStorage( | 338 void DOMStorageContextWrapper::DeleteSessionStorage( |
330 const SessionStorageUsageInfo& usage_info) { | 339 const SessionStorageUsageInfo& usage_info) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 } | 437 } |
429 | 438 |
430 void DOMStorageContextWrapper::PurgeMemory(DOMStorageContextImpl::PurgeOption | 439 void DOMStorageContextWrapper::PurgeMemory(DOMStorageContextImpl::PurgeOption |
431 purge_option) { | 440 purge_option) { |
432 context_->task_runner()->PostTask( | 441 context_->task_runner()->PostTask( |
433 FROM_HERE, | 442 FROM_HERE, |
434 base::Bind(&DOMStorageContextImpl::PurgeMemory, context_, purge_option)); | 443 base::Bind(&DOMStorageContextImpl::PurgeMemory, context_, purge_option)); |
435 } | 444 } |
436 | 445 |
437 } // namespace content | 446 } // namespace content |
OLD | NEW |