From c9ce60ba84839bb415222019f97c2499c64eb3f4 Mon Sep 17 00:00:00 2001 From: "rsimha@chromium.org" Date: Wed, 19 Dec 2012 23:16:08 +0000 Subject: [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 --- sync/syncable/syncable_read_transaction.h | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sync/syncable/syncable_read_transaction.h (limited to 'sync/syncable/syncable_read_transaction.h') 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_ -- cgit v1.1