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

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

Issue 272043002: Invoke AttachmentUploader and update AttachmentIds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
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_WRITE_TRANSACTION_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "sync/api/sync_change_processor.h" 10 #include "sync/api/sync_change_processor.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 syncable::WriteTransaction* GetWrappedWriteTrans() { return transaction_; } 45 syncable::WriteTransaction* GetWrappedWriteTrans() { return transaction_; }
46 46
47 // Set's a |type|'s local context. |refresh_status| controls whether 47 // Set's a |type|'s local context. |refresh_status| controls whether
48 // a datatype refresh is performed (clearing the progress marker token and 48 // a datatype refresh is performed (clearing the progress marker token and
49 // setting the version of all synced entities to 1). 49 // setting the version of all synced entities to 1).
50 void SetDataTypeContext( 50 void SetDataTypeContext(
51 ModelType type, 51 ModelType type,
52 syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status, 52 syncer::SyncChangeProcessor::ContextRefreshStatus refresh_status,
53 const std::string& context); 53 const std::string& context);
54 54
55 // Attachment id was just updated. Propagate this change to all entries that
56 // refer this attachment id.
57 void UpdateEntriesWithAttachmentId(const AttachmentId& attachment_id);
maniscalco 2014/05/09 18:12:11 How about a unit test for this method? directory_
pavely 2014/05/13 23:06:44 directory_unittest tests the other WriteTransactio
maniscalco 2014/05/15 20:09:28 You are right, directory_unittest is for the other
58
55 protected: 59 protected:
56 WriteTransaction() {} 60 WriteTransaction() {}
57 61
58 void SetTransaction(syncable::WriteTransaction* trans) { 62 void SetTransaction(syncable::WriteTransaction* trans) {
59 transaction_ = trans; 63 transaction_ = trans;
60 } 64 }
61 65
62 private: 66 private:
63 void* operator new(size_t size); // Transaction is meant for stack use only. 67 void* operator new(size_t size); // Transaction is meant for stack use only.
64 68
65 // The underlying syncable object which this class wraps. 69 // The underlying syncable object which this class wraps.
66 syncable::WriteTransaction* transaction_; 70 syncable::WriteTransaction* transaction_;
67 71
68 DISALLOW_COPY_AND_ASSIGN(WriteTransaction); 72 DISALLOW_COPY_AND_ASSIGN(WriteTransaction);
69 }; 73 };
70 74
71 } // namespace syncer 75 } // namespace syncer
72 76
73 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ 77 #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698