| 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_server_bound_cert_store.h" | 5 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
| 23 #include "net/cert/x509_certificate.h" | 23 #include "net/cert/x509_certificate.h" |
| 24 #include "net/cookies/cookie_util.h" | 24 #include "net/cookies/cookie_util.h" |
| 25 #include "net/ssl/ssl_client_cert_type.h" | 25 #include "net/ssl/ssl_client_cert_type.h" |
| 26 #include "sql/error_delegate_util.h" | 26 #include "sql/error_delegate_util.h" |
| 27 #include "sql/meta_table.h" | 27 #include "sql/meta_table.h" |
| 28 #include "sql/statement.h" | 28 #include "sql/statement.h" |
| 29 #include "sql/transaction.h" | 29 #include "sql/transaction.h" |
| 30 #include "third_party/sqlite/sqlite3.h" | 30 #include "third_party/sqlite/sqlite3.h" |
| 31 #include "webkit/quota/special_storage_policy.h" | 31 #include "webkit/browser/quota/special_storage_policy.h" |
| 32 | 32 |
| 33 using content::BrowserThread; | 33 using content::BrowserThread; |
| 34 | 34 |
| 35 // This class is designed to be shared between any calling threads and the | 35 // This class is designed to be shared between any calling threads and the |
| 36 // database thread. It batches operations and commits them on a timer. | 36 // database thread. It batches operations and commits them on a timer. |
| 37 class SQLiteServerBoundCertStore::Backend | 37 class SQLiteServerBoundCertStore::Backend |
| 38 : public base::RefCountedThreadSafe<SQLiteServerBoundCertStore::Backend> { | 38 : public base::RefCountedThreadSafe<SQLiteServerBoundCertStore::Backend> { |
| 39 public: | 39 public: |
| 40 Backend(const base::FilePath& path, | 40 Backend(const base::FilePath& path, |
| 41 quota::SpecialStoragePolicy* special_storage_policy) | 41 quota::SpecialStoragePolicy* special_storage_policy) |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 | 663 |
| 664 void SQLiteServerBoundCertStore::SetForceKeepSessionState() { | 664 void SQLiteServerBoundCertStore::SetForceKeepSessionState() { |
| 665 backend_->SetForceKeepSessionState(); | 665 backend_->SetForceKeepSessionState(); |
| 666 } | 666 } |
| 667 | 667 |
| 668 SQLiteServerBoundCertStore::~SQLiteServerBoundCertStore() { | 668 SQLiteServerBoundCertStore::~SQLiteServerBoundCertStore() { |
| 669 backend_->Close(); | 669 backend_->Close(); |
| 670 // We release our reference to the Backend, though it will probably still have | 670 // We release our reference to the Backend, though it will probably still have |
| 671 // a reference if the background thread has not run Close() yet. | 671 // a reference if the background thread has not run Close() yet. |
| 672 } | 672 } |
| OLD | NEW |