OLD | NEW |
1 // Copyright (c) 2009 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/net/sqlite_persistent_cookie_store.h" | 5 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "app/sql/statement.h" | 9 #include "app/sql/statement.h" |
10 #include "app/sql/transaction.h" | 10 #include "app/sql/transaction.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/file_util.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
14 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
15 #include "base/string_util.h" | 16 #include "base/string_util.h" |
16 #include "base/thread.h" | 17 #include "base/thread.h" |
17 #include "chrome/browser/chrome_thread.h" | 18 #include "chrome/browser/chrome_thread.h" |
18 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" | 19 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
19 | 20 |
20 using base::Time; | 21 using base::Time; |
21 | 22 |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 const net::CookieMonster::CanonicalCookie& cc) { | 438 const net::CookieMonster::CanonicalCookie& cc) { |
438 if (backend_.get()) | 439 if (backend_.get()) |
439 backend_->UpdateCookieAccessTime(cc); | 440 backend_->UpdateCookieAccessTime(cc); |
440 } | 441 } |
441 | 442 |
442 void SQLitePersistentCookieStore::DeleteCookie( | 443 void SQLitePersistentCookieStore::DeleteCookie( |
443 const net::CookieMonster::CanonicalCookie& cc) { | 444 const net::CookieMonster::CanonicalCookie& cc) { |
444 if (backend_.get()) | 445 if (backend_.get()) |
445 backend_->DeleteCookie(cc); | 446 backend_->DeleteCookie(cc); |
446 } | 447 } |
| 448 |
| 449 // static |
| 450 void SQLitePersistentCookieStore::ClearLocalState( |
| 451 const FilePath& path) { |
| 452 file_util::Delete(path, false); |
| 453 } |
OLD | NEW |