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

Side by Side Diff: chrome/browser/extensions/extension_data_deleter.cc

Issue 2857029: Fix bug in DeleteAllForURL; deletes entire store instead of just (Closed)
Patch Set: Incorporated comments from eroman and mnissler. Created 10 years, 5 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
« no previous file with comments | « no previous file | net/base/cookie_monster.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_data_deleter.h" 5 #include "chrome/browser/extensions/extension_data_deleter.h"
6 6
7 #include "chrome/browser/profile.h" 7 #include "chrome/browser/profile.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "net/base/cookie_monster.h" 9 #include "net/base/cookie_monster.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 26 matching lines...) Expand all
37 ChromeThread::FILE, FROM_HERE, 37 ChromeThread::FILE, FROM_HERE,
38 NewRunnableMethod( 38 NewRunnableMethod(
39 this, &ExtensionDataDeleter::DeleteDatabaseOnFileThread)); 39 this, &ExtensionDataDeleter::DeleteDatabaseOnFileThread));
40 } 40 }
41 41
42 void ExtensionDataDeleter::DeleteCookiesOnIOThread() { 42 void ExtensionDataDeleter::DeleteCookiesOnIOThread() {
43 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 43 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
44 net::CookieMonster* cookie_monster = 44 net::CookieMonster* cookie_monster =
45 extension_request_context_->GetCookieStore()->GetCookieMonster(); 45 extension_request_context_->GetCookieStore()->GetCookieMonster();
46 if (cookie_monster) 46 if (cookie_monster)
47 cookie_monster->DeleteAllForURL(extension_url_, true); 47 cookie_monster->DeleteAllForHost(extension_url_);
48 } 48 }
49 49
50 void ExtensionDataDeleter::DeleteDatabaseOnFileThread() { 50 void ExtensionDataDeleter::DeleteDatabaseOnFileThread() {
51 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); 51 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
52 int rv = database_tracker_->DeleteDataForOrigin(origin_id_, NULL); 52 int rv = database_tracker_->DeleteDataForOrigin(origin_id_, NULL);
53 DCHECK(rv == net::OK || rv == net::ERR_IO_PENDING); 53 DCHECK(rv == net::OK || rv == net::ERR_IO_PENDING);
54 } 54 }
55 55
56 void ExtensionDataDeleter::DeleteLocalStorageOnWebkitThread() { 56 void ExtensionDataDeleter::DeleteLocalStorageOnWebkitThread() {
57 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)); 57 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
58 webkit_context_->dom_storage_context()->DeleteLocalStorageForOrigin( 58 webkit_context_->dom_storage_context()->DeleteLocalStorageForOrigin(
59 origin_id_); 59 origin_id_);
60 } 60 }
OLDNEW
« no previous file with comments | « no previous file | net/base/cookie_monster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698