summaryrefslogtreecommitdiffstats
path: root/sync/syncable/syncable_read_transaction.h
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 23:16:08 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 23:16:08 +0000
commitc9ce60ba84839bb415222019f97c2499c64eb3f4 (patch)
tree2951b4af13346acfb545a6ccc3a621c1560a863a /sync/syncable/syncable_read_transaction.h
parent05aee8931fc1b9a1cf73003cba7f05673bb4959d (diff)
downloadchromium_src-c9ce60ba84839bb415222019f97c2499c64eb3f4.zip
chromium_src-c9ce60ba84839bb415222019f97c2499c64eb3f4.tar.gz
chromium_src-c9ce60ba84839bb415222019f97c2499c64eb3f4.tar.bz2
[sync] Componentize sync: Part 5: Eliminate filename collisions in sync.gyp
In order to move src/sync into its own compoent, all the static_library targets in sync.gyp need to be converted to targets of type 'none' and rolled into one sync target of type component. This is currently blocked by duplicate .cc filenames in syncable and internal_api, which flags an error while running gyp. The offending files are {internal_api|syncable}/{base|read|write}_transaction.cc. This patch renames syncable/{base|read|write}_transaction.{h|cc} to syncable/syncable_{base|read|write}_transaction.{h|cc}. BUG=136928 Review URL: https://codereview.chromium.org/11638018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/syncable_read_transaction.h')
-rw-r--r--sync/syncable/syncable_read_transaction.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sync/syncable/syncable_read_transaction.h b/sync/syncable/syncable_read_transaction.h
new file mode 100644
index 0000000..276e930
--- /dev/null
+++ b/sync/syncable/syncable_read_transaction.h
@@ -0,0 +1,32 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_
+#define SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_
+
+#include "sync/syncable/syncable_base_transaction.h"
+
+namespace syncer {
+class ReadTransaction;
+namespace syncable {
+
+// Locks db in constructor, unlocks in destructor.
+class ReadTransaction : public BaseTransaction {
+ public:
+ ReadTransaction(const tracked_objects::Location& from_here,
+ Directory* directory);
+
+ virtual ~ReadTransaction();
+
+ protected: // Don't allow creation on heap, except by sync API wrapper.
+ friend class syncer::ReadTransaction;
+ void* operator new(size_t size) { return (::operator new)(size); }
+
+ DISALLOW_COPY_AND_ASSIGN(ReadTransaction);
+};
+
+} // namespace syncable
+} // namespace syncer
+
+#endif // SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_