| Index: net/sqlite/sqlite_server_bound_cert_store.cc
|
| diff --git a/chrome/browser/net/sqlite_server_bound_cert_store.cc b/net/sqlite/sqlite_server_bound_cert_store.cc
|
| similarity index 97%
|
| rename from chrome/browser/net/sqlite_server_bound_cert_store.cc
|
| rename to net/sqlite/sqlite_server_bound_cert_store.cc
|
| index fbac4c36d72405ba4183f7446f913c31cc91ff69..b70b79205698513f5c0a956537331446962e8e14 100644
|
| --- a/chrome/browser/net/sqlite_server_bound_cert_store.cc
|
| +++ b/net/sqlite/sqlite_server_bound_cert_store.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/net/sqlite_server_bound_cert_store.h"
|
| +#include "net/sqlite/sqlite_server_bound_cert_store.h"
|
|
|
| #include <list>
|
| #include <set>
|
| @@ -19,14 +19,15 @@
|
| #include "base/threading/thread_restrictions.h"
|
| #include "net/cert/x509_certificate.h"
|
| #include "net/cookies/cookie_util.h"
|
| +#include "net/sqlite/special_storage_policy_delegate.h"
|
| #include "net/ssl/ssl_client_cert_type.h"
|
| #include "sql/error_delegate_util.h"
|
| #include "sql/meta_table.h"
|
| #include "sql/statement.h"
|
| #include "sql/transaction.h"
|
| -#include "third_party/sqlite/sqlite3.h"
|
| #include "url/gurl.h"
|
| -#include "webkit/browser/quota/special_storage_policy.h"
|
| +
|
| +namespace net {
|
|
|
| // This class is designed to be shared between any calling threads and the
|
| // background task runner. It batches operations and commits them on a timer.
|
| @@ -36,12 +37,12 @@ class SQLiteServerBoundCertStore::Backend
|
| Backend(
|
| const base::FilePath& path,
|
| const scoped_refptr<base::SequencedTaskRunner>& background_task_runner,
|
| - quota::SpecialStoragePolicy* special_storage_policy)
|
| + scoped_ptr<SpecialStoragePolicyDelegate> special_storage_policy)
|
| : path_(path),
|
| num_pending_(0),
|
| force_keep_session_state_(false),
|
| background_task_runner_(background_task_runner),
|
| - special_storage_policy_(special_storage_policy),
|
| + special_storage_policy_(special_storage_policy.Pass()),
|
| corruption_detected_(false) {}
|
|
|
| // Creates or loads the SQLite database.
|
| @@ -130,7 +131,7 @@ class SQLiteServerBoundCertStore::Backend
|
|
|
| scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
|
|
|
| - scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
|
| + scoped_ptr<SpecialStoragePolicyDelegate> special_storage_policy_;
|
|
|
| // Indicates if the kill-database callback has been scheduled.
|
| bool corruption_detected_;
|
| @@ -608,10 +609,10 @@ void SQLiteServerBoundCertStore::Backend::SetForceKeepSessionState() {
|
| SQLiteServerBoundCertStore::SQLiteServerBoundCertStore(
|
| const base::FilePath& path,
|
| const scoped_refptr<base::SequencedTaskRunner>& background_task_runner,
|
| - quota::SpecialStoragePolicy* special_storage_policy)
|
| + scoped_ptr<SpecialStoragePolicyDelegate> special_storage_policy)
|
| : backend_(new Backend(path,
|
| background_task_runner,
|
| - special_storage_policy)) {}
|
| + special_storage_policy.Pass())) {}
|
|
|
| void SQLiteServerBoundCertStore::Load(
|
| const LoadedCallback& loaded_callback) {
|
| @@ -637,3 +638,5 @@ SQLiteServerBoundCertStore::~SQLiteServerBoundCertStore() {
|
| // We release our reference to the Backend, though it will probably still have
|
| // a reference if the background thread has not run Close() yet.
|
| }
|
| +
|
| +} // namespace net
|
|
|