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

Side by Side Diff: sync/syncable/syncable_read_transaction.h

Issue 11412211: [sync] Componentize sync: Part Final: Target 'sync' is now its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more CR feedback Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_ 5 #ifndef SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_
6 #define SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_ 6 #define SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_
7 7
8 #include "base/compiler_specific.h"
8 #include "sync/base/sync_export.h" 9 #include "sync/base/sync_export.h"
9 #include "sync/syncable/syncable_base_transaction.h" 10 #include "sync/syncable/syncable_base_transaction.h"
10 11
11 namespace syncer { 12 namespace syncer {
12 class ReadTransaction; 13 class ReadTransaction;
13 namespace syncable { 14 namespace syncable {
14 15
15 // Locks db in constructor, unlocks in destructor. 16 // Locks db in constructor, unlocks in destructor.
16 class SYNC_EXPORT_PRIVATE ReadTransaction : public BaseTransaction { 17 class SYNC_EXPORT_PRIVATE ReadTransaction
18 : public NON_EXPORTED_BASE(BaseTransaction) {
17 public: 19 public:
18 ReadTransaction(const tracked_objects::Location& from_here, 20 ReadTransaction(const tracked_objects::Location& from_here,
19 Directory* directory); 21 Directory* directory);
20 22
21 virtual ~ReadTransaction(); 23 virtual ~ReadTransaction();
22 24
23 protected: // Don't allow creation on heap, except by sync API wrapper. 25 protected: // Don't allow creation on heap, except by sync API wrapper.
24 friend class syncer::ReadTransaction; 26 friend class syncer::ReadTransaction;
25 void* operator new(size_t size) { return (::operator new)(size); } 27 void* operator new(size_t size) { return (::operator new)(size); }
26 28
27 DISALLOW_COPY_AND_ASSIGN(ReadTransaction); 29 DISALLOW_COPY_AND_ASSIGN(ReadTransaction);
28 }; 30 };
29 31
30 } // namespace syncable 32 } // namespace syncable
31 } // namespace syncer 33 } // namespace syncer
32 34
33 #endif // SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_ 35 #endif // SYNC_SYNCABLE_SYNCABLE_READ_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698