diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 00:37:18 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 00:37:18 +0000 |
commit | 7e2584b7da3b6a7f797ec9040c91e0f612d11239 (patch) | |
tree | d11a1f798d166da8998da12419124a1a6a1efaba /chrome/browser/net | |
parent | ffdd3aafda7da07f7cb7d5d10eae6276336e3270 (diff) | |
download | chromium_src-7e2584b7da3b6a7f797ec9040c91e0f612d11239.zip chromium_src-7e2584b7da3b6a7f797ec9040c91e0f612d11239.tar.gz chromium_src-7e2584b7da3b6a7f797ec9040c91e0f612d11239.tar.bz2 |
Clear local state (cookies, databases, local storage) on exit.
BUG=32719
TEST=none
Review URL: http://codereview.chromium.org/564012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r-- | chrome/browser/net/sqlite_persistent_cookie_store.cc | 9 | ||||
-rw-r--r-- | chrome/browser/net/sqlite_persistent_cookie_store.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.cc b/chrome/browser/net/sqlite_persistent_cookie_store.cc index 0216b40..a098c44 100644 --- a/chrome/browser/net/sqlite_persistent_cookie_store.cc +++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,6 +9,7 @@ #include "app/sql/statement.h" #include "app/sql/transaction.h" #include "base/basictypes.h" +#include "base/file_util.h" #include "base/logging.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" @@ -444,3 +445,9 @@ void SQLitePersistentCookieStore::DeleteCookie( if (backend_.get()) backend_->DeleteCookie(cc); } + +// static +void SQLitePersistentCookieStore::ClearLocalState( + const FilePath& path) { + file_util::Delete(path, false); +} diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.h b/chrome/browser/net/sqlite_persistent_cookie_store.h index e687f02..9b12ee4 100644 --- a/chrome/browser/net/sqlite_persistent_cookie_store.h +++ b/chrome/browser/net/sqlite_persistent_cookie_store.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -32,6 +32,8 @@ class SQLitePersistentCookieStore const net::CookieMonster::CanonicalCookie&); virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&); + static void ClearLocalState(const FilePath& path); + private: class Backend; |