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

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: Created 8 years, 7 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 void DOMStorageContextImpl::DeleteLocalStorageFile(const FilePath& file_path) { 127 void DOMStorageContextImpl::DeleteLocalStorageFile(const FilePath& file_path) {
128 DCHECK(context_); 128 DCHECK(context_);
129 context_->task_runner()->PostShutdownBlockingTask( 129 context_->task_runner()->PostShutdownBlockingTask(
130 FROM_HERE, 130 FROM_HERE,
131 DomStorageTaskRunner::PRIMARY_SEQUENCE, 131 DomStorageTaskRunner::PRIMARY_SEQUENCE,
132 base::Bind(&DomStorageContext::DeleteOrigin, context_, 132 base::Bind(&DomStorageContext::DeleteOrigin, context_,
133 FilePathToOrigin(file_path))); 133 FilePathToOrigin(file_path)));
134 } 134 }
135 135
136 void DOMStorageContextImpl::DeleteDataModifiedSince(const base::Time& cutoff) { 136 void DOMStorageContextImpl::DeleteDataModifiedSince(const base::Time& cutoff,
jochen (gone - plz use gerrit) 2012/05/23 11:02:21 nit. all arguments should go on their own line
Mike West 2012/05/23 11:23:51 Done.
137 bool include_protected_origins) {
137 DCHECK(context_); 138 DCHECK(context_);
138 context_->task_runner()->PostShutdownBlockingTask( 139 context_->task_runner()->PostShutdownBlockingTask(
139 FROM_HERE, 140 FROM_HERE,
140 DomStorageTaskRunner::PRIMARY_SEQUENCE, 141 DomStorageTaskRunner::PRIMARY_SEQUENCE,
141 base::Bind(&DomStorageContext::DeleteDataModifiedSince, context_, 142 base::Bind(&DomStorageContext::DeleteDataModifiedSince, context_,
142 cutoff)); 143 cutoff, include_protected_origins));
143 } 144 }
144 145
145 void DOMStorageContextImpl::PurgeMemory() { 146 void DOMStorageContextImpl::PurgeMemory() {
146 DCHECK(context_); 147 DCHECK(context_);
147 context_->task_runner()->PostShutdownBlockingTask( 148 context_->task_runner()->PostShutdownBlockingTask(
148 FROM_HERE, 149 FROM_HERE,
149 DomStorageTaskRunner::PRIMARY_SEQUENCE, 150 DomStorageTaskRunner::PRIMARY_SEQUENCE,
150 base::Bind(&DomStorageContext::PurgeMemory, context_)); 151 base::Bind(&DomStorageContext::PurgeMemory, context_));
151 } 152 }
152 153
(...skipping 25 matching lines...) Expand all
178 int64 DOMStorageContextImpl::LeakyCloneSessionStorage( 179 int64 DOMStorageContextImpl::LeakyCloneSessionStorage(
179 int64 existing_namespace_id) { 180 int64 existing_namespace_id) {
180 DCHECK(context_); 181 DCHECK(context_);
181 int64 clone_id = context_->AllocateSessionId(); 182 int64 clone_id = context_->AllocateSessionId();
182 context_->task_runner()->PostTask( 183 context_->task_runner()->PostTask(
183 FROM_HERE, 184 FROM_HERE,
184 base::Bind(&DomStorageContext::CloneSessionNamespace, context_, 185 base::Bind(&DomStorageContext::CloneSessionNamespace, context_,
185 existing_namespace_id, clone_id)); 186 existing_namespace_id, clone_id));
186 return clone_id; 187 return clone_id;
187 } 188 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698