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, |
| 326 DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| 327 base::Bind(&DOMStorageContextImpl::DeleteLocalStorageForPhysicalOrigin, |
| 328 context_, origin)); |
| 329 } |
| 330 |
321 void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { | 331 void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { |
322 DCHECK(context_.get()); | 332 DCHECK(context_.get()); |
323 context_->task_runner()->PostShutdownBlockingTask( | 333 context_->task_runner()->PostShutdownBlockingTask( |
324 FROM_HERE, | 334 FROM_HERE, |
325 DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 335 DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
326 base::Bind(&DOMStorageContextImpl::DeleteLocalStorage, context_, origin)); | 336 base::Bind(&DOMStorageContextImpl::DeleteLocalStorage, context_, origin)); |
327 } | 337 } |
328 | 338 |
329 void DOMStorageContextWrapper::DeleteSessionStorage( | 339 void DOMStorageContextWrapper::DeleteSessionStorage( |
330 const SessionStorageUsageInfo& usage_info) { | 340 const SessionStorageUsageInfo& usage_info) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 } | 438 } |
429 | 439 |
430 void DOMStorageContextWrapper::PurgeMemory(DOMStorageContextImpl::PurgeOption | 440 void DOMStorageContextWrapper::PurgeMemory(DOMStorageContextImpl::PurgeOption |
431 purge_option) { | 441 purge_option) { |
432 context_->task_runner()->PostTask( | 442 context_->task_runner()->PostTask( |
433 FROM_HERE, | 443 FROM_HERE, |
434 base::Bind(&DOMStorageContextImpl::PurgeMemory, context_, purge_option)); | 444 base::Bind(&DOMStorageContextImpl::PurgeMemory, context_, purge_option)); |
435 } | 445 } |
436 | 446 |
437 } // namespace content | 447 } // namespace content |
OLD | NEW |