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

Side by Side Diff: chrome/browser/net/sqlite_persistent_cookie_store.cc

Issue 5430004: Refactored cookies persistent store clean-up on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fix. Created 10 years 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) 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/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"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 if (backend_.get()) 433 if (backend_.get())
434 backend_->UpdateCookieAccessTime(cc); 434 backend_->UpdateCookieAccessTime(cc);
435 } 435 }
436 436
437 void SQLitePersistentCookieStore::DeleteCookie( 437 void SQLitePersistentCookieStore::DeleteCookie(
438 const net::CookieMonster::CanonicalCookie& cc) { 438 const net::CookieMonster::CanonicalCookie& cc) {
439 if (backend_.get()) 439 if (backend_.get())
440 backend_->DeleteCookie(cc); 440 backend_->DeleteCookie(cc);
441 } 441 }
442 442
443 // static 443 void SQLitePersistentCookieStore::ClearLocalState() {
444 void SQLitePersistentCookieStore::ClearLocalState( 444 file_util::Delete(path_, false);
Mattias Nissler (ping if slow) 2010/12/01 17:23:24 What's the contract on the question which thread t
Randy Smith (Not in Mondays) 2010/12/01 20:39:50 This file's somewhat messy WRT thread access. The
jochen (gone - plz use gerrit) 2010/12/02 08:45:50 I think this should be done on the DB thread. Also
445 const FilePath& path) {
446 file_util::Delete(path, false);
447 } 445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698