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

Side by Side Diff: sync/api/syncable_service.h

Issue 792343004: Standardize usage of virtual/override/final specifiers in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « no previous file | sync/engine/apply_control_data_updates_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_API_SYNCABLE_SERVICE_H_ 5 #ifndef SYNC_API_SYNCABLE_SERVICE_H_
6 #define SYNC_API_SYNCABLE_SERVICE_H_ 6 #define SYNC_API_SYNCABLE_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 scoped_ptr<SyncErrorFactory> error_handler) = 0; 56 scoped_ptr<SyncErrorFactory> error_handler) = 0;
57 57
58 // Stop syncing the specified type and reset state. 58 // Stop syncing the specified type and reset state.
59 virtual void StopSyncing(ModelType type) = 0; 59 virtual void StopSyncing(ModelType type) = 0;
60 60
61 // SyncChangeProcessor interface. 61 // SyncChangeProcessor interface.
62 // Process a list of new SyncChanges and update the local data as necessary. 62 // Process a list of new SyncChanges and update the local data as necessary.
63 // Returns: A default SyncError (IsSet() == false) if no errors were 63 // Returns: A default SyncError (IsSet() == false) if no errors were
64 // encountered, and a filled SyncError (IsSet() == true) 64 // encountered, and a filled SyncError (IsSet() == true)
65 // otherwise. 65 // otherwise.
66 virtual SyncError ProcessSyncChanges( 66 SyncError ProcessSyncChanges(const tracked_objects::Location& from_here,
67 const tracked_objects::Location& from_here, 67 const SyncChangeList& change_list) override = 0;
68 const SyncChangeList& change_list) override = 0;
69 68
70 // Returns AttachmentStore used by datatype. Attachment store is used by sync 69 // Returns AttachmentStore used by datatype. Attachment store is used by sync
71 // when uploading or downloading attachments. 70 // when uploading or downloading attachments.
72 // GetAttachmentStore is called right before MergeDataAndStartSyncing. If at 71 // GetAttachmentStore is called right before MergeDataAndStartSyncing. If at
73 // that time GetAttachmentStore returns NULL then datatype is considered not 72 // that time GetAttachmentStore returns NULL then datatype is considered not
74 // using attachments and all attempts to upload/download attachments will 73 // using attachments and all attempts to upload/download attachments will
75 // fail. Default implementation returns NULL. Datatype that uses sync 74 // fail. Default implementation returns NULL. Datatype that uses sync
76 // attachemnts should create attachment store and implement GetAttachmentStore 75 // attachemnts should create attachment store and implement GetAttachmentStore
77 // to return pointer to it. 76 // to return pointer to it.
78 virtual scoped_refptr<AttachmentStore> GetAttachmentStore(); 77 virtual scoped_refptr<AttachmentStore> GetAttachmentStore();
79 78
80 // Called by sync to provide AttachmentService to be used to download 79 // Called by sync to provide AttachmentService to be used to download
81 // attachments. 80 // attachments.
82 // SetAttachmentService is called after GetAttachmentStore and right before 81 // SetAttachmentService is called after GetAttachmentStore and right before
83 // MergeDataAndStartSyncing and only if GetAttachmentStore has returned a 82 // MergeDataAndStartSyncing and only if GetAttachmentStore has returned a
84 // non-NULL store instance. Default implementation does nothing. 83 // non-NULL store instance. Default implementation does nothing.
85 // Datatype that uses attachments must take ownerhip of the provided 84 // Datatype that uses attachments must take ownerhip of the provided
86 // AttachmentService instance. 85 // AttachmentService instance.
87 virtual void SetAttachmentService( 86 virtual void SetAttachmentService(
88 scoped_ptr<AttachmentService> attachment_service); 87 scoped_ptr<AttachmentService> attachment_service);
89 88
90 protected: 89 protected:
91 ~SyncableService() override; 90 ~SyncableService() override;
92 }; 91 };
93 92
94 } // namespace syncer 93 } // namespace syncer
95 94
96 #endif // SYNC_API_SYNCABLE_SERVICE_H_ 95 #endif // SYNC_API_SYNCABLE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | sync/engine/apply_control_data_updates_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698