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

Side by Side Diff: chrome/browser/sync/api/sync_change_processor.h

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add operator= Created 9 years, 5 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 class SyncChange; 11 class SyncChange;
12 class SyncError;
12 13
13 namespace tracked_objects { 14 namespace tracked_objects {
14 class Location; 15 class Location;
15 } // namespace tracked_objects 16 } // namespace tracked_objects
16 17
17 typedef std::vector<SyncChange> SyncChangeList; 18 typedef std::vector<SyncChange> SyncChangeList;
18 19
19 // An interface for services that handle receiving SyncChanges. 20 // An interface for services that handle receiving SyncChanges.
20 class SyncChangeProcessor { 21 class SyncChangeProcessor {
21 public: 22 public:
22 // Process a list of SyncChanges. 23 // Process a list of SyncChanges.
23 virtual void ProcessSyncChanges(const tracked_objects::Location& from_here, 24 // Returns: false if an error occured, true otherwise.
24 const SyncChangeList& change_list) = 0; 25 // Inputs:
26 // |from_here|: allows tracking of where sync changes originate.
27 // |change_list|: is the list of sync changes in need of processing.
28 // |error|: if an error occurred, the error tracking information.
29 virtual bool ProcessSyncChanges(const tracked_objects::Location& from_here,
30 const SyncChangeList& change_list,
31 SyncError* error) = 0;
25 protected: 32 protected:
26 virtual ~SyncChangeProcessor(); 33 virtual ~SyncChangeProcessor();
27 }; 34 };
28 35
29 36
30 #endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_ 37 #endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698