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

Unified Diff: sync/internal_api/write_node.h

Issue 10310113: Add additional error logging to investigate Autocomplete Sync failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert a couple of stray changes Created 8 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/write_node.h
diff --git a/sync/internal_api/write_node.h b/sync/internal_api/write_node.h
index a070a5c069260ad6c34f34bef410dae4e7bc8aa7..2fedf3d888f36a539ac951d21d2c4494f2028115 100644
--- a/sync/internal_api/write_node.h
+++ b/sync/internal_api/write_node.h
@@ -46,6 +46,19 @@ class WriteTransaction;
// syncable::MutableEntry. A WriteTransaction is needed to create a WriteNode.
class WriteNode : public BaseNode {
public:
+ // TODO(isherman): Investigating http://crbug.com/122687
tim (not reviewing) 2012/05/17 00:22:10 I think having the return code is okay long-term /
Ilya Sherman 2012/05/17 00:40:04 Done.
+ enum InitUniqueByCreationResult {
+ INIT_SUCCESS,
+ // The tag passed into this method was empty.
+ INIT_FAILED_EMPTY_TAG,
+ // An entry with this tag already exists.
+ INIT_FAILED_ENTRY_ALREADY_EXISTS,
+ // The constructor for a new MutableEntry with the specified data failed.
+ INIT_FAILED_COULD_NOT_CREATE_ENTRY,
+ // Setting the predecessor failed
+ INIT_FAILED_SET_PREDECESSOR,
+ };
+
// Create a WriteNode using the given transaction.
explicit WriteNode(WriteTransaction* transaction);
virtual ~WriteNode();
@@ -75,9 +88,10 @@ class WriteNode : public BaseNode {
// Most importantly, if it exists locally, this function will
// actually undelete it
// Client unique tagged nodes must NOT be folders.
- bool InitUniqueByCreation(syncable::ModelType model_type,
- const BaseNode& parent,
- const std::string& client_tag);
+ InitUniqueByCreationResult InitUniqueByCreation(
+ syncable::ModelType model_type,
+ const BaseNode& parent,
+ const std::string& client_tag);
// Each server-created permanent node is tagged with a unique string.
// Look up the node with the particular tag. If it does not exist,

Powered by Google App Engine
This is Rietveld 408576698