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

Unified Diff: net/sqlite/sqlite_server_bound_cert_store.cc

Issue 381073002: Move sqlite_channel_id_store from chrome/browser/net to net/extras. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement chrome_special_storage_policy_delegate. Created 6 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/sqlite/sqlite_server_bound_cert_store.h ('k') | net/sqlite/sqlite_server_bound_cert_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/sqlite/sqlite_server_bound_cert_store.h ('k') | net/sqlite/sqlite_server_bound_cert_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698