summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-07 08:46:34 +0000
committerjsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-07 08:46:34 +0000
commite8ca0f51e2ed34a1749bdd7cdc42393532ea87dd (patch)
tree53d1b6d53c3d218a2cfb899e02c1bd5d3ad3fde4
parent1d70cc60526e7cb00f5e2f293f951f202ed016e6 (diff)
downloadchromium_src-e8ca0f51e2ed34a1749bdd7cdc42393532ea87dd.zip
chromium_src-e8ca0f51e2ed34a1749bdd7cdc42393532ea87dd.tar.gz
chromium_src-e8ca0f51e2ed34a1749bdd7cdc42393532ea87dd.tar.bz2
IndexedDB: Sprinkle DISALLOW_COPY_AND_ASSIGN where appropriate
Much of the Indexed DB backend was ported from blink, and we didn't remember to add these macros in most places. Toss 'em in where easy. BUG=381456 R=cmumford@chromium.org,ericu@chromium.org Review URL: https://codereview.chromium.org/312093005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275653 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc4
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store.cc18
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store.h7
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store_unittest.cc12
-rw-r--r--content/browser/indexed_db/indexed_db_browsertest.cc15
-rw-r--r--content/browser/indexed_db/indexed_db_callbacks.h2
-rw-r--r--content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc9
-rw-r--r--content/browser/indexed_db/indexed_db_connection.h2
-rw-r--r--content/browser/indexed_db/indexed_db_cursor.h2
-rw-r--r--content/browser/indexed_db/indexed_db_database.h2
-rw-r--r--content/browser/indexed_db/indexed_db_database_callbacks.h2
-rw-r--r--content/browser/indexed_db/indexed_db_database_error.h2
-rw-r--r--content/browser/indexed_db/indexed_db_database_unittest.cc5
-rw-r--r--content/browser/indexed_db/indexed_db_dispatcher_host.h8
-rw-r--r--content/browser/indexed_db/indexed_db_factory.h2
-rw-r--r--content/browser/indexed_db/indexed_db_factory_unittest.cc13
-rw-r--r--content/browser/indexed_db/indexed_db_fake_backing_store.h4
-rw-r--r--content/browser/indexed_db/indexed_db_index_writer.h2
-rw-r--r--content/browser/indexed_db/indexed_db_internals_ui.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_transaction.h4
-rw-r--r--content/browser/indexed_db/indexed_db_transaction_coordinator.h2
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_database.cc4
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_database.h8
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_transaction.h8
-rw-r--r--content/child/indexed_db/indexed_db_dispatcher_unittest.cc9
-rw-r--r--content/child/indexed_db/indexed_db_key_builders.h15
26 files changed, 162 insertions, 1 deletions
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
index 5c42b6a..c8f8475 100644
--- a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
@@ -49,6 +49,8 @@ class MockIDBFactory : public IndexedDBFactory {
private:
std::set<GURL> origins_;
bool duplicate_calls_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockIDBFactory);
};
class MockIDBBackingStore : public IndexedDBFakeBackingStore {
@@ -79,6 +81,8 @@ class MockIDBBackingStore : public IndexedDBFakeBackingStore {
private:
KeyPairSet unused_blobs_;
bool duplicate_calls_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockIDBBackingStore);
};
// Base class for our test fixtures.
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index 991c1c3..1e1d85b 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -485,6 +485,7 @@ WARN_UNUSED_RESULT static leveldb::Status GetMaxObjectStoreId(
class DefaultLevelDBFactory : public LevelDBFactory {
public:
+ DefaultLevelDBFactory() {}
virtual leveldb::Status OpenLevelDB(const base::FilePath& file_name,
const LevelDBComparator* comparator,
scoped_ptr<LevelDBDatabase>* db,
@@ -495,6 +496,9 @@ class DefaultLevelDBFactory : public LevelDBFactory {
OVERRIDE {
return LevelDBDatabase::Destroy(file_name);
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DefaultLevelDBFactory);
};
static bool GetBlobKeyGeneratorCurrentNumber(
@@ -2224,6 +2228,8 @@ class IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl
scoped_refptr<IndexedDBBackingStore::BlobWriteCallback> callback_;
scoped_ptr<FileWriterDelegate> delegate_;
bool aborted_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChainedBlobWriterImpl);
};
class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
@@ -2289,6 +2295,8 @@ class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
IndexedDBBackingStore::Transaction::ChainedBlobWriter* chained_blob_writer_;
base::TaskRunner* task_runner_;
int64 bytes_written_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalWriteClosure);
};
bool IndexedDBBackingStore::WriteBlobFile(
@@ -3213,6 +3221,8 @@ class ObjectStoreKeyCursorImpl : public IndexedDBBackingStore::Cursor {
private:
explicit ObjectStoreKeyCursorImpl(const ObjectStoreKeyCursorImpl* other)
: IndexedDBBackingStore::Cursor(other) {}
+
+ DISALLOW_COPY_AND_ASSIGN(ObjectStoreKeyCursorImpl);
};
bool ObjectStoreKeyCursorImpl::LoadCurrentRow() {
@@ -3275,6 +3285,8 @@ class ObjectStoreCursorImpl : public IndexedDBBackingStore::Cursor {
current_value_(other->current_value_) {}
IndexedDBValue current_value_;
+
+ DISALLOW_COPY_AND_ASSIGN(ObjectStoreCursorImpl);
};
bool ObjectStoreCursorImpl::LoadCurrentRow() {
@@ -3359,6 +3371,8 @@ class IndexKeyCursorImpl : public IndexedDBBackingStore::Cursor {
primary_key_(new IndexedDBKey(*other->primary_key_)) {}
scoped_ptr<IndexedDBKey> primary_key_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexKeyCursorImpl);
};
bool IndexKeyCursorImpl::LoadCurrentRow() {
@@ -3473,6 +3487,8 @@ class IndexCursorImpl : public IndexedDBBackingStore::Cursor {
scoped_ptr<IndexedDBKey> primary_key_;
IndexedDBValue current_value_;
std::string primary_leveldb_key_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexCursorImpl);
};
bool IndexCursorImpl::LoadCurrentRow() {
@@ -4053,6 +4069,8 @@ class IndexedDBBackingStore::Transaction::BlobWriteCallbackWrapper
IndexedDBBackingStore::Transaction* transaction_;
scoped_refptr<BlobWriteCallback> callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlobWriteCallbackWrapper);
};
void IndexedDBBackingStore::Transaction::WriteNewBlobs(
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index febcd70..6720ee9 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -175,6 +175,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
class BlobWriteCallback : public base::RefCounted<BlobWriteCallback> {
public:
virtual void Run(bool succeeded) = 0;
+
protected:
virtual ~BlobWriteCallback() {}
friend class base::RefCounted<BlobWriteCallback>;
@@ -333,6 +334,9 @@ class CONTENT_EXPORT IndexedDBBackingStore
scoped_ptr<LevelDBIterator> iterator_;
scoped_ptr<IndexedDBKey> current_key_;
IndexedDBBackingStore::RecordIdentifier record_identifier_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Cursor);
};
virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
@@ -459,6 +463,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
virtual ~ChainedBlobWriter() {}
friend class base::RefCounted<ChainedBlobWriter>;
};
+
class ChainedBlobWriterImpl;
typedef std::vector<WriteDescriptor> WriteDescriptorVec;
@@ -562,6 +567,8 @@ class CONTENT_EXPORT IndexedDBBackingStore
// will hold a reference to this backing store.
IndexedDBActiveBlobRegistry active_blob_registry_;
base::OneShotTimer<IndexedDBBackingStore> close_timer_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index bdbf077..e356619 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -40,6 +40,7 @@ class Comparator : public LevelDBComparator {
class DefaultLevelDBFactory : public LevelDBFactory {
public:
+ DefaultLevelDBFactory() {}
virtual leveldb::Status OpenLevelDB(const base::FilePath& file_name,
const LevelDBComparator* comparator,
scoped_ptr<LevelDBDatabase>* db,
@@ -50,6 +51,9 @@ class DefaultLevelDBFactory : public LevelDBFactory {
const base::FilePath& file_name) OVERRIDE {
return LevelDBDatabase::Destroy(file_name);
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DefaultLevelDBFactory);
};
class TestableIndexedDBBackingStore : public IndexedDBBackingStore {
@@ -160,6 +164,8 @@ class TestableIndexedDBBackingStore : public IndexedDBBackingStore {
int64 database_id_;
std::vector<Transaction::WriteDescriptor> writes_;
std::vector<int64> removals_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestableIndexedDBBackingStore);
};
class TestIDBFactory : public IndexedDBFactory {
@@ -204,6 +210,9 @@ class TestIDBFactory : public IndexedDBFactory {
&leveldb_factory,
context()->TaskRunner());
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestIDBFactory);
};
class IndexedDBBackingStoreTest : public testing::Test {
@@ -343,6 +352,9 @@ class TestCallback : public IndexedDBBackingStore::BlobWriteCallback {
protected:
virtual ~TestCallback() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestCallback);
};
TEST_F(IndexedDBBackingStoreTest, PutGetConsistency) {
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 98da8c0..2fb57de 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -132,6 +132,8 @@ class IndexedDBBrowserTest : public ContentBrowserTest {
}
int64 disk_usage_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTest);
};
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTest) {
@@ -208,10 +210,15 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, Bug109187Test) {
class IndexedDBBrowserTestWithLowQuota : public IndexedDBBrowserTest {
public:
+ IndexedDBBrowserTestWithLowQuota() {}
+
virtual void SetUpOnMainThread() OVERRIDE {
const int kInitialQuotaKilobytes = 5000;
SetQuota(kInitialQuotaKilobytes);
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTestWithLowQuota);
};
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithLowQuota, QuotaTest) {
@@ -220,9 +227,14 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithLowQuota, QuotaTest) {
class IndexedDBBrowserTestWithGCExposed : public IndexedDBBrowserTest {
public:
+ IndexedDBBrowserTestWithGCExposed() {}
+
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTestWithGCExposed);
};
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed,
@@ -250,6 +262,7 @@ static void CopyLevelDBToProfile(Shell* shell,
class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
public:
+ IndexedDBBrowserTestWithPreexistingLevelDB() {}
virtual void SetUpOnMainThread() OVERRIDE {
scoped_refptr<IndexedDBContextImpl> context = GetContext();
context->TaskRunner()->PostTask(
@@ -264,6 +277,8 @@ class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
virtual std::string EnclosingLevelDBDir() = 0;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTestWithPreexistingLevelDB);
};
class IndexedDBBrowserTestWithVersion0Schema : public
diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h
index 1bf5c11..8041fb8 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_callbacks.h
@@ -132,6 +132,8 @@ class CONTENT_EXPORT IndexedDBCallbacks
// Stored in OnDataLoss, merged with OnUpgradeNeeded response.
blink::WebIDBDataLoss data_loss_;
std::string data_loss_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
index d19a0b8..49d0436 100644
--- a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
@@ -37,6 +37,7 @@ namespace {
class BustedLevelDBDatabase : public LevelDBDatabase {
public:
+ BustedLevelDBDatabase() {}
static scoped_ptr<LevelDBDatabase> Open(
const base::FilePath& file_name,
const LevelDBComparator* /*comparator*/) {
@@ -48,6 +49,9 @@ class BustedLevelDBDatabase : public LevelDBDatabase {
const LevelDBSnapshot* = 0) OVERRIDE {
return leveldb::Status::IOError("It's busted!");
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BustedLevelDBDatabase);
};
class MockLevelDBFactory : public LevelDBFactory {
@@ -71,6 +75,9 @@ class MockLevelDBFactory : public LevelDBFactory {
private:
bool destroy_called_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockLevelDBFactory);
};
TEST(IndexedDBIOErrorTest, CleanUpTest) {
@@ -131,6 +138,8 @@ class MockErrorLevelDBFactory : public LevelDBFactory {
T error_;
bool expect_destroy_;
bool destroy_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockErrorLevelDBFactory);
};
TEST(IndexedDBNonRecoverableIOErrorTest, NuancedCleanupTest) {
diff --git a/content/browser/indexed_db/indexed_db_connection.h b/content/browser/indexed_db/indexed_db_connection.h
index e4ed928..95d1f2e 100644
--- a/content/browser/indexed_db/indexed_db_connection.h
+++ b/content/browser/indexed_db/indexed_db_connection.h
@@ -34,6 +34,8 @@ class CONTENT_EXPORT IndexedDBConnection {
// The callbacks_ member is cleared when the connection is closed.
// May be NULL in unit tests.
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBConnection);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_cursor.h b/content/browser/indexed_db/indexed_db_cursor.h
index 4c1ec0c..7c1491a 100644
--- a/content/browser/indexed_db/indexed_db_cursor.h
+++ b/content/browser/indexed_db/indexed_db_cursor.h
@@ -69,6 +69,8 @@ class CONTENT_EXPORT IndexedDBCursor
scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_;
bool closed_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h
index c0bd789..63a438a 100644
--- a/content/browser/indexed_db/indexed_db_database.h
+++ b/content/browser/indexed_db/indexed_db_database.h
@@ -290,6 +290,8 @@ class CONTENT_EXPORT IndexedDBDatabase
typedef list_set<IndexedDBConnection*> ConnectionSet;
ConnectionSet connections_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.h b/content/browser/indexed_db/indexed_db_database_callbacks.h
index 0fae780..ad16a04 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.h
@@ -36,6 +36,8 @@ class CONTENT_EXPORT IndexedDBDatabaseCallbacks
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
int ipc_thread_id_;
int ipc_database_callbacks_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacks);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database_error.h b/content/browser/indexed_db/indexed_db_database_error.h
index 84fee94..5b81a7a 100644
--- a/content/browser/indexed_db/indexed_db_database_error.h
+++ b/content/browser/indexed_db/indexed_db_database_error.h
@@ -27,6 +27,8 @@ class IndexedDBDatabaseError {
private:
const uint16 code_;
const base::string16 message_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseError);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index 9f3d029..307cf514 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -170,6 +170,8 @@ class MockDeleteCallbacks : public IndexedDBCallbacks {
bool blocked_called_;
bool success_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockDeleteCallbacks);
};
TEST(IndexedDBDatabaseTest, PendingDelete) {
@@ -324,6 +326,9 @@ class IndexedDBDatabaseOperationAbortTest
IndexedDBDatabaseOperationAbortTest() {
commit_success_ = leveldb::Status::NotFound("Bummer.");
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseOperationAbortTest);
};
TEST_F(IndexedDBDatabaseOperationAbortTest, CreateObjectStore) {
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.h b/content/browser/indexed_db/indexed_db_dispatcher_host.h
index a69a584..c2c78b4 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -149,6 +149,8 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
private:
IDMap<scoped_refptr<RefCountedType>, IDMapOwnPointer> map_;
+
+ DISALLOW_COPY_AND_ASSIGN(RefIDMap);
};
// Helper templates.
@@ -223,6 +225,9 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
TransactionIDToSizeMap transaction_size_map_;
TransactionIDToURLMap transaction_url_map_;
TransactionIDToDatabaseIDMap transaction_database_map_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DatabaseDispatcherHost);
};
class CursorDispatcherHost {
@@ -252,6 +257,9 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
IndexedDBDispatcherHost* parent_;
RefIDMap<IndexedDBCursor> map_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CursorDispatcherHost);
};
// The getter holds the context until OnChannelConnected() can be called from
diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h
index 20d18c2..9c16ada 100644
--- a/content/browser/indexed_db/indexed_db_factory.h
+++ b/content/browser/indexed_db/indexed_db_factory.h
@@ -143,6 +143,8 @@ class CONTENT_EXPORT IndexedDBFactory
std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_;
IndexedDBBackingStoreMap backing_stores_with_active_blobs_;
std::set<GURL> backends_opened_since_boot_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBFactory);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index f30f451..ba7de61 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -58,6 +58,8 @@ class MockIDBFactory : public IndexedDBFactory {
private:
virtual ~MockIDBFactory() {}
+
+ DISALLOW_COPY_AND_ASSIGN(MockIDBFactory);
};
} // namespace
@@ -210,6 +212,8 @@ class DiskFullFactory : public IndexedDBFactory {
*disk_full = true;
return scoped_refptr<IndexedDBBackingStore>();
}
+
+ DISALLOW_COPY_AND_ASSIGN(DiskFullFactory);
};
class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks {
@@ -225,6 +229,8 @@ class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks {
private:
virtual ~LookingForQuotaErrorMockCallbacks() {}
bool error_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(LookingForQuotaErrorMockCallbacks);
};
TEST_F(IndexedDBFactoryTest, QuotaErrorOnDiskFull) {
@@ -421,6 +427,8 @@ TEST_F(IndexedDBFactoryTest, ForceCloseReleasesBackingStore) {
class UpgradeNeededCallbacks : public MockIndexedDBCallbacks {
public:
+ UpgradeNeededCallbacks() {}
+
virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
const IndexedDBDatabaseMetadata& metadata) OVERRIDE {
EXPECT_TRUE(connection_.get());
@@ -436,6 +444,9 @@ class UpgradeNeededCallbacks : public MockIndexedDBCallbacks {
protected:
virtual ~UpgradeNeededCallbacks() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpgradeNeededCallbacks);
};
class ErrorCallbacks : public MockIndexedDBCallbacks {
@@ -450,6 +461,8 @@ class ErrorCallbacks : public MockIndexedDBCallbacks {
private:
virtual ~ErrorCallbacks() {}
bool saw_error_;
+
+ DISALLOW_COPY_AND_ASSIGN(ErrorCallbacks);
};
TEST_F(IndexedDBFactoryTest, DatabaseFailedOpen) {
diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.h b/content/browser/indexed_db/indexed_db_fake_backing_store.h
index 6f383c1..1529c9f 100644
--- a/content/browser/indexed_db/indexed_db_fake_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_fake_backing_store.h
@@ -144,11 +144,15 @@ class IndexedDBFakeBackingStore : public IndexedDBBackingStore {
private:
leveldb::Status result_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeTransaction);
};
protected:
friend class base::RefCounted<IndexedDBFakeBackingStore>;
virtual ~IndexedDBFakeBackingStore();
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBFakeBackingStore);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_index_writer.h b/content/browser/indexed_db/indexed_db_index_writer.h
index aeadea5..ef4bb16 100644
--- a/content/browser/indexed_db/indexed_db_index_writer.h
+++ b/content/browser/indexed_db/indexed_db_index_writer.h
@@ -56,6 +56,8 @@ class IndexWriter {
const IndexedDBIndexMetadata index_metadata_;
IndexedDBDatabase::IndexKeys index_keys_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexWriter);
};
bool MakeIndexWriters(
diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc
index e2fd12f..7c16e19 100644
--- a/content/browser/indexed_db/indexed_db_internals_ui.cc
+++ b/content/browser/indexed_db/indexed_db_internals_ui.cc
@@ -310,6 +310,8 @@ class FileDeleter : public DownloadItem::Observer {
private:
const base::FilePath temp_dir_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileDeleter);
};
void FileDeleter::OnDownloadUpdated(DownloadItem* item) {
diff --git a/content/browser/indexed_db/indexed_db_transaction.h b/content/browser/indexed_db/indexed_db_transaction.h
index a28a9d4..e30422f 100644
--- a/content/browser/indexed_db/indexed_db_transaction.h
+++ b/content/browser/indexed_db/indexed_db_transaction.h
@@ -132,6 +132,8 @@ class CONTENT_EXPORT IndexedDBTransaction
private:
std::queue<Operation> queue_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskQueue);
};
class TaskStack {
@@ -145,6 +147,8 @@ class CONTENT_EXPORT IndexedDBTransaction
private:
std::stack<Operation> stack_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskStack);
};
TaskQueue task_queue_;
diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.h b/content/browser/indexed_db/indexed_db_transaction_coordinator.h
index a483dfb..98db0b3 100644
--- a/content/browser/indexed_db/indexed_db_transaction_coordinator.h
+++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.h
@@ -47,6 +47,8 @@ class IndexedDBTransactionCoordinator {
typedef list_set<scoped_refptr<IndexedDBTransaction> > TransactionSet;
TransactionSet queued_transactions_;
TransactionSet started_transactions_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBTransactionCoordinator);
};
} // namespace content
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.cc b/content/browser/indexed_db/leveldb/leveldb_database.cc
index 0efbcd1..9ef3929 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_database.cc
@@ -124,6 +124,8 @@ class LockImpl : public LevelDBLock {
private:
leveldb::Env* env_;
leveldb::FileLock* lock_;
+
+ DISALLOW_COPY_AND_ASSIGN(LockImpl);
};
}
@@ -391,6 +393,8 @@ class IteratorImpl : public LevelDBIterator {
void CheckStatus();
scoped_ptr<leveldb::Iterator> iterator_;
+
+ DISALLOW_COPY_AND_ASSIGN(IteratorImpl);
};
}
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.h b/content/browser/indexed_db/leveldb/leveldb_database.h
index e4f6af9..f6bf7be 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.h
+++ b/content/browser/indexed_db/leveldb/leveldb_database.h
@@ -39,11 +39,17 @@ class LevelDBSnapshot {
leveldb::DB* db_;
const leveldb::Snapshot* snapshot_;
+
+ DISALLOW_COPY_AND_ASSIGN(LevelDBSnapshot);
};
class CONTENT_EXPORT LevelDBLock {
-public:
+ public:
+ LevelDBLock() {}
virtual ~LevelDBLock() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(LevelDBLock);
};
class CONTENT_EXPORT LevelDBDatabase {
diff --git a/content/browser/indexed_db/leveldb/leveldb_transaction.h b/content/browser/indexed_db/leveldb/leveldb_transaction.h
index 1102651..5f421b4 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction.h
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction.h
@@ -80,6 +80,8 @@ class CONTENT_EXPORT LevelDBTransaction
explicit DataIterator(LevelDBTransaction* transaction);
DataType* data_;
DataType::iterator iterator_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataIterator);
};
class TransactionIterator : public LevelDBIterator {
@@ -118,6 +120,8 @@ class CONTENT_EXPORT LevelDBTransaction
};
Direction direction_;
mutable bool data_changed_;
+
+ DISALLOW_COPY_AND_ASSIGN(TransactionIterator);
};
void Set(const base::StringPiece& key, std::string* value, bool deleted);
@@ -133,6 +137,8 @@ class CONTENT_EXPORT LevelDBTransaction
DataType data_;
bool finished_;
std::set<TransactionIterator*> iterators_;
+
+ DISALLOW_COPY_AND_ASSIGN(LevelDBTransaction);
};
// Reads go straight to the database, ignoring any writes cached in
@@ -155,6 +161,8 @@ class LevelDBDirectTransaction {
LevelDBDatabase* db_;
scoped_ptr<LevelDBWriteBatch> write_batch_;
bool finished_;
+
+ DISALLOW_COPY_AND_ASSIGN(LevelDBDirectTransaction);
};
} // namespace content
diff --git a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
index dbe43fc..98f929e 100644
--- a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
@@ -39,6 +39,8 @@ class MockCallbacks : public WebIDBCallbacks {
private:
bool error_seen_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockCallbacks);
};
class MockDispatcher : public IndexedDBDispatcher {
@@ -49,6 +51,9 @@ class MockDispatcher : public IndexedDBDispatcher {
delete msg;
return true;
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockDispatcher);
};
} // namespace
@@ -142,6 +147,8 @@ class CursorCallbacks : public WebIDBCallbacks {
private:
scoped_ptr<WebIDBCursor>* cursor_;
+
+ DISALLOW_COPY_AND_ASSIGN(CursorCallbacks);
};
} // namespace
@@ -248,6 +255,8 @@ class MockCursor : public WebIDBCursorImpl {
private:
int reset_count_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockCursor);
};
} // namespace
diff --git a/content/child/indexed_db/indexed_db_key_builders.h b/content/child/indexed_db/indexed_db_key_builders.h
index 5a51a8a..fb299c0 100644
--- a/content/child/indexed_db/indexed_db_key_builders.h
+++ b/content/child/indexed_db/indexed_db_key_builders.h
@@ -22,26 +22,41 @@ namespace content {
class CONTENT_EXPORT IndexedDBKeyBuilder {
public:
static IndexedDBKey Build(const blink::WebIDBKey& key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyBuilder);
};
class CONTENT_EXPORT WebIDBKeyBuilder {
public:
static blink::WebIDBKey Build(const content::IndexedDBKey& key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyBuilder);
};
class CONTENT_EXPORT IndexedDBKeyRangeBuilder {
public:
static IndexedDBKeyRange Build(const blink::WebIDBKeyRange& key_range);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyRangeBuilder);
};
class CONTENT_EXPORT IndexedDBKeyPathBuilder {
public:
static IndexedDBKeyPath Build(const blink::WebIDBKeyPath& key_path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyPathBuilder);
};
class CONTENT_EXPORT WebIDBKeyPathBuilder {
public:
static blink::WebIDBKeyPath Build(const IndexedDBKeyPath& key_path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyPathBuilder);
};
} // namespace content