| OLD | NEW |
| 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 "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 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
| 16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
| 23 #include "base/threading/thread.h" | 23 #include "base/threading/thread.h" |
| 24 #include "base/threading/thread_restrictions.h" | 24 #include "base/threading/thread_restrictions.h" |
| 25 #include "base/time.h" | 25 #include "base/time.h" |
| 26 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" | 26 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
| 27 #include "chrome/browser/net/clear_on_exit_policy.h" | 27 #include "chrome/browser/net/clear_on_exit_policy.h" |
| 28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
| 29 #include "googleurl/src/gurl.h" | 29 #include "googleurl/src/gurl.h" |
| 30 #include "net/base/registry_controlled_domain.h" | 30 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 31 #include "net/cookies/canonical_cookie.h" | 31 #include "net/cookies/canonical_cookie.h" |
| 32 #include "sql/meta_table.h" | 32 #include "sql/meta_table.h" |
| 33 #include "sql/statement.h" | 33 #include "sql/statement.h" |
| 34 #include "sql/transaction.h" | 34 #include "sql/transaction.h" |
| 35 | 35 |
| 36 using base::Time; | 36 using base::Time; |
| 37 using content::BrowserThread; | 37 using content::BrowserThread; |
| 38 | 38 |
| 39 // This class is designed to be shared between any calling threads and the | 39 // This class is designed to be shared between any calling threads and the |
| 40 // database thread. It batches operations and commits them on a timer. | 40 // database thread. It batches operations and commits them on a timer. |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() { | 1028 SQLitePersistentCookieStore::~SQLitePersistentCookieStore() { |
| 1029 if (backend_.get()) { | 1029 if (backend_.get()) { |
| 1030 backend_->Close(); | 1030 backend_->Close(); |
| 1031 // Release our reference, it will probably still have a reference if the | 1031 // Release our reference, it will probably still have a reference if the |
| 1032 // background thread has not run Close() yet. | 1032 // background thread has not run Close() yet. |
| 1033 backend_ = NULL; | 1033 backend_ = NULL; |
| 1034 } | 1034 } |
| 1035 } | 1035 } |
| OLD | NEW |