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

Side by Side Diff: chrome/browser/sync/glue/syncable_service_adapter.h

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix final unit test <3 c++ 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_GLUE_SYNCABLE_SERVICE_ADAPTER_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCABLE_SERVICE_ADAPTER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNCABLE_SERVICE_ADAPTER_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCABLE_SERVICE_ADAPTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 // services. Implements the model associator interface, invoking the 22 // services. Implements the model associator interface, invoking the
23 // provided SyncableService as necessary. 23 // provided SyncableService as necessary.
24 class SyncableServiceAdapter : public AssociatorInterface { 24 class SyncableServiceAdapter : public AssociatorInterface {
25 public: 25 public:
26 SyncableServiceAdapter(syncable::ModelType type, 26 SyncableServiceAdapter(syncable::ModelType type,
27 SyncableService* service, 27 SyncableService* service,
28 GenericChangeProcessor* sync_processor); 28 GenericChangeProcessor* sync_processor);
29 virtual ~SyncableServiceAdapter(); 29 virtual ~SyncableServiceAdapter();
30 30
31 // AssociatorInterface implementation. 31 // AssociatorInterface implementation.
32 virtual bool AssociateModels() OVERRIDE; 32 virtual bool AssociateModels(SyncError* error) OVERRIDE;
33 virtual bool DisassociateModels() OVERRIDE; 33 virtual bool DisassociateModels(SyncError* error) OVERRIDE;
34 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) OVERRIDE; 34 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) OVERRIDE;
35 virtual void AbortAssociation() OVERRIDE; 35 virtual void AbortAssociation() OVERRIDE;
36 virtual bool CryptoReadyIfNecessary() OVERRIDE; 36 virtual bool CryptoReadyIfNecessary() OVERRIDE;
37 37
38 private: 38 private:
39 // Whether the SyncableService we wrap is currently syncing or not. 39 // Whether the SyncableService we wrap is currently syncing or not.
40 bool syncing_; 40 bool syncing_;
41 41
42 // The data type being provided by this service. 42 // The data type being provided by this service.
43 syncable::ModelType type_; 43 syncable::ModelType type_;
44 44
45 // A pointer to the actual local syncable service, which performs all the 45 // A pointer to the actual local syncable service, which performs all the
46 // real work. 46 // real work.
47 SyncableService* service_; 47 SyncableService* service_;
48 48
49 // The datatype's SyncChange handler that interacts with the sync db. 49 // The datatype's SyncChange handler that interacts with the sync db.
50 GenericChangeProcessor* sync_processor_; 50 GenericChangeProcessor* sync_processor_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(SyncableServiceAdapter); 52 DISALLOW_COPY_AND_ASSIGN(SyncableServiceAdapter);
53 }; 53 };
54 54
55 } // namespace browser_sync 55 } // namespace browser_sync
56 56
57 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCABLE_SERVICE_ADAPTER_H_ 57 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCABLE_SERVICE_ADAPTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.cc ('k') | chrome/browser/sync/glue/syncable_service_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698