Chromium Code Reviews| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 void DOMStorageContextWrapper::GetSessionStorageUsage( | 163 void DOMStorageContextWrapper::GetSessionStorageUsage( |
| 164 const GetSessionStorageUsageCallback& callback) { | 164 const GetSessionStorageUsageCallback& callback) { |
| 165 DCHECK(context_.get()); | 165 DCHECK(context_.get()); |
| 166 context_->task_runner()->PostShutdownBlockingTask( | 166 context_->task_runner()->PostShutdownBlockingTask( |
| 167 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 167 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| 168 base::Bind(&GetSessionStorageUsageHelper, | 168 base::Bind(&GetSessionStorageUsageHelper, |
| 169 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), | 169 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), |
| 170 base::RetainedRef(context_), callback)); | 170 base::RetainedRef(context_), callback)); |
| 171 } | 171 } |
| 172 | 172 |
| 173 | |
|
msramek
2017/01/09 12:54:44
style: This empty line is superfluous.
| |
| 173 void DOMStorageContextWrapper::DeleteLocalStorageForPhysicalOrigin( | 174 void DOMStorageContextWrapper::DeleteLocalStorageForPhysicalOrigin( |
| 174 const GURL& origin) { | 175 const GURL& origin) { |
| 175 DCHECK(context_.get()); | 176 DCHECK(context_.get()); |
| 177 // TODO? This method sometimes leaves traces of localstorage behind that show | |
|
msramek
2017/01/09 12:54:44
Let's file this one as a bug as well. Please leave
dullweber
2017/01/09 16:05:46
I filed it as http://crbug.com/679344
| |
| 178 // that there was localstorage for an origin. I didn't find a way to fix this. | |
| 176 context_->task_runner()->PostShutdownBlockingTask( | 179 context_->task_runner()->PostShutdownBlockingTask( |
| 177 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 180 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| 178 base::Bind(&DOMStorageContextImpl::DeleteLocalStorageForPhysicalOrigin, | 181 base::Bind(&DOMStorageContextImpl::DeleteLocalStorageForPhysicalOrigin, |
| 179 context_, origin)); | 182 context_, origin)); |
| 180 if (mojo_state_) | 183 if (mojo_state_) |
| 181 mojo_state_->DeleteStorageForPhysicalOrigin(url::Origin(origin)); | 184 mojo_state_->DeleteStorageForPhysicalOrigin(url::Origin(origin)); |
| 182 } | 185 } |
| 183 | 186 |
| 184 void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { | 187 void DOMStorageContextWrapper::DeleteLocalStorage(const GURL& origin) { |
| 185 DCHECK(context_.get()); | 188 DCHECK(context_.get()); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 GetLocalStorageUsageCallback callback, | 308 GetLocalStorageUsageCallback callback, |
| 306 std::vector<LocalStorageUsageInfo> usage) { | 309 std::vector<LocalStorageUsageInfo> usage) { |
| 307 context_->task_runner()->PostShutdownBlockingTask( | 310 context_->task_runner()->PostShutdownBlockingTask( |
| 308 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 311 FROM_HERE, DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| 309 base::Bind(&GetLocalStorageUsageHelper, base::Passed(&usage), | 312 base::Bind(&GetLocalStorageUsageHelper, base::Passed(&usage), |
| 310 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), | 313 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), |
| 311 base::RetainedRef(context_), callback)); | 314 base::RetainedRef(context_), callback)); |
| 312 } | 315 } |
| 313 | 316 |
| 314 } // namespace content | 317 } // namespace content |
| OLD | NEW |