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

Side by Side Diff: sync/internal_api/public/read_transaction.h

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
6 #define SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <string> 11 #include <string>
9 12
10 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h"
11 #include "sync/api/attachments/attachment_id.h" 15 #include "sync/api/attachments/attachment_id.h"
12 #include "sync/base/sync_export.h" 16 #include "sync/base/sync_export.h"
13 #include "sync/internal_api/public/base_transaction.h" 17 #include "sync/internal_api/public/base_transaction.h"
14 18
15 namespace tracked_objects { 19 namespace tracked_objects {
16 class Location; 20 class Location;
17 } // namespace tracked_objects 21 } // namespace tracked_objects
18 22
19 namespace sync_pb { 23 namespace sync_pb {
20 class DataTypeContext; 24 class DataTypeContext;
(...skipping 14 matching lines...) Expand all
35 // Resume the middle of a transaction. Will not close transaction. 39 // Resume the middle of a transaction. Will not close transaction.
36 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans); 40 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans);
37 41
38 ~ReadTransaction() override; 42 ~ReadTransaction() override;
39 43
40 // BaseTransaction override. 44 // BaseTransaction override.
41 syncable::BaseTransaction* GetWrappedTrans() const override; 45 syncable::BaseTransaction* GetWrappedTrans() const override;
42 46
43 // Return |transaction_version| of |type| stored in sync directory's 47 // Return |transaction_version| of |type| stored in sync directory's
44 // persisted info. 48 // persisted info.
45 int64 GetModelVersion(ModelType type) const; 49 int64_t GetModelVersion(ModelType type) const;
46 50
47 // Fills |context| with the datatype context associated with |type|. 51 // Fills |context| with the datatype context associated with |type|.
48 void GetDataTypeContext(ModelType type, 52 void GetDataTypeContext(ModelType type,
49 sync_pb::DataTypeContext* context) const; 53 sync_pb::DataTypeContext* context) const;
50 54
51 // Clear |ids| and fill it with the ids of attachments that need to be 55 // Clear |ids| and fill it with the ids of attachments that need to be
52 // uploaded to the sync server. 56 // uploaded to the sync server.
53 void GetAttachmentIdsToUpload(ModelType type, AttachmentIdList* ids) const; 57 void GetAttachmentIdsToUpload(ModelType type, AttachmentIdList* ids) const;
54 58
55 // Return the current (opaque) store birthday. 59 // Return the current (opaque) store birthday.
56 std::string GetStoreBirthday() const; 60 std::string GetStoreBirthday() const;
57 61
58 private: 62 private:
59 void* operator new(size_t size); // Transaction is meant for stack use only. 63 void* operator new(size_t size); // Transaction is meant for stack use only.
60 64
61 // The underlying syncable object which this class wraps. 65 // The underlying syncable object which this class wraps.
62 syncable::BaseTransaction* transaction_; 66 syncable::BaseTransaction* transaction_;
63 bool close_transaction_; 67 bool close_transaction_;
64 68
65 DISALLOW_COPY_AND_ASSIGN(ReadTransaction); 69 DISALLOW_COPY_AND_ASSIGN(ReadTransaction);
66 }; 70 };
67 71
68 } // namespace syncer 72 } // namespace syncer
69 73
70 #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ 74 #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/read_node.h ('k') | sync/internal_api/public/sessions/model_neutral_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698