Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: content/browser/dom_storage/dom_storage_context_impl.cc

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bernhard. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/browser/dom_storage/dom_storage_context_impl.h" 5 #include "content/browser/dom_storage/dom_storage_context_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 void DOMStorageContextImpl::DeleteLocalStorageFile(const FilePath& file_path) { 164 void DOMStorageContextImpl::DeleteLocalStorageFile(const FilePath& file_path) {
165 DCHECK(context_); 165 DCHECK(context_);
166 context_->task_runner()->PostShutdownBlockingTask( 166 context_->task_runner()->PostShutdownBlockingTask(
167 FROM_HERE, 167 FROM_HERE,
168 DomStorageTaskRunner::PRIMARY_SEQUENCE, 168 DomStorageTaskRunner::PRIMARY_SEQUENCE,
169 base::Bind(&DomStorageContext::DeleteOrigin, context_, 169 base::Bind(&DomStorageContext::DeleteOrigin, context_,
170 FilePathToOrigin(file_path))); 170 FilePathToOrigin(file_path)));
171 } 171 }
172 172
173 void DOMStorageContextImpl::DeleteDataModifiedSince(const base::Time& cutoff) {
174 DCHECK(context_);
175 context_->task_runner()->PostShutdownBlockingTask(
176 FROM_HERE,
177 DomStorageTaskRunner::PRIMARY_SEQUENCE,
178 base::Bind(&DomStorageContext::DeleteDataModifiedSince, context_,
179 cutoff));
180 }
181
182 void DOMStorageContextImpl::PurgeMemory() { 173 void DOMStorageContextImpl::PurgeMemory() {
183 DCHECK(context_); 174 DCHECK(context_);
184 context_->task_runner()->PostShutdownBlockingTask( 175 context_->task_runner()->PostShutdownBlockingTask(
185 FROM_HERE, 176 FROM_HERE,
186 DomStorageTaskRunner::PRIMARY_SEQUENCE, 177 DomStorageTaskRunner::PRIMARY_SEQUENCE,
187 base::Bind(&DomStorageContext::PurgeMemory, context_)); 178 base::Bind(&DomStorageContext::PurgeMemory, context_));
188 } 179 }
189 180
190 void DOMStorageContextImpl::SetClearLocalState(bool clear_local_state) { 181 void DOMStorageContextImpl::SetClearLocalState(bool clear_local_state) {
191 DCHECK(context_); 182 DCHECK(context_);
(...skipping 23 matching lines...) Expand all
215 int64 DOMStorageContextImpl::LeakyCloneSessionStorage( 206 int64 DOMStorageContextImpl::LeakyCloneSessionStorage(
216 int64 existing_namespace_id) { 207 int64 existing_namespace_id) {
217 DCHECK(context_); 208 DCHECK(context_);
218 int64 clone_id = context_->AllocateSessionId(); 209 int64 clone_id = context_->AllocateSessionId();
219 context_->task_runner()->PostTask( 210 context_->task_runner()->PostTask(
220 FROM_HERE, 211 FROM_HERE,
221 base::Bind(&DomStorageContext::CloneSessionNamespace, context_, 212 base::Bind(&DomStorageContext::CloneSessionNamespace, context_,
222 existing_namespace_id, clone_id)); 213 existing_namespace_id, clone_id));
223 return clone_id; 214 return clone_id;
224 } 215 }
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.h ('k') | content/public/browser/dom_storage_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698