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

Unified Diff: chrome/browser/sync/glue/typed_url_model_associator.h

Issue 9978017: [Sync] - Upload the callstacks for errors so that the line number of error is in callstack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/typed_url_model_associator.h
diff --git a/chrome/browser/sync/glue/typed_url_model_associator.h b/chrome/browser/sync/glue/typed_url_model_associator.h
index 07dbd5408f83936b2dff3fed144a1c5f97a0439f..019c760c684bfed8e7efa6948c6c99faeecddbe5 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator.h
+++ b/chrome/browser/sync/glue/typed_url_model_associator.h
@@ -15,6 +15,7 @@
#include "base/compiler_specific.h"
#include "base/string16.h"
#include "chrome/browser/history/history_types.h"
+#include "chrome/browser/sync/glue/data_type_error_handler.h"
#include "chrome/browser/sync/glue/model_associator.h"
#include "sync/protocol/typed_url_specifics.pb.h"
@@ -50,16 +51,17 @@ class TypedUrlModelAssociator : public AssociatorInterface {
static syncable::ModelType model_type() { return syncable::TYPED_URLS; }
TypedUrlModelAssociator(ProfileSyncService* sync_service,
- history::HistoryBackend* history_backend);
+ history::HistoryBackend* history_backend,
+ DataTypeErrorHandler* error_handler);
virtual ~TypedUrlModelAssociator();
// AssociatorInterface implementation.
//
// Iterates through the sync model looking for matched pairs of items.
- virtual bool AssociateModels(SyncError* error) OVERRIDE;
+ virtual SyncError AssociateModels() OVERRIDE;
// Clears all associations.
- virtual bool DisassociateModels(SyncError* error) OVERRIDE;
+ virtual SyncError DisassociateModels() OVERRIDE;
// Called from the main thread, to abort the currently active model
// association (for example, if we are shutting down).
@@ -74,10 +76,10 @@ class TypedUrlModelAssociator : public AssociatorInterface {
// Delete all typed url nodes.
bool DeleteAllNodes(sync_api::WriteTransaction* trans);
- bool WriteToHistoryBackend(const history::URLRows* new_urls,
- const TypedUrlUpdateVector* updated_urls,
- const TypedUrlVisitVector* new_visits,
- const history::VisitVector* deleted_visits);
+ SyncError WriteToHistoryBackend(const history::URLRows* new_urls,
+ const TypedUrlUpdateVector* updated_urls,
+ const TypedUrlVisitVector* new_visits,
+ const history::VisitVector* deleted_visits);
// Given a typed URL in the sync DB, looks for an existing entry in the
// local history DB and generates a list of visits to add to the
@@ -87,7 +89,7 @@ class TypedUrlModelAssociator : public AssociatorInterface {
// |updated_urls| or |new_urls| depending on whether the URL already existed
// in the history DB.
// Returns false if we encountered an error trying to access the history DB.
- bool UpdateFromSyncDB(const sync_pb::TypedUrlSpecifics& typed_url,
+ SyncError UpdateFromSyncDB(const sync_pb::TypedUrlSpecifics& typed_url,
TypedUrlVisitVector* visits_to_add,
history::VisitVector* visits_to_remove,
TypedUrlUpdateVector* updated_urls,
@@ -180,6 +182,8 @@ class TypedUrlModelAssociator : public AssociatorInterface {
// Set to true if there's a pending abort.
bool pending_abort_;
+ DataTypeErrorHandler* error_handler_; // Guaranteed to outlive datatypes.
+
DISALLOW_COPY_AND_ASSIGN(TypedUrlModelAssociator);
};
« no previous file with comments | « chrome/browser/sync/glue/typed_url_change_processor.cc ('k') | chrome/browser/sync/glue/typed_url_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698