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

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: De-nitting 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
« no previous file with comments | « sync/internal_api/syncapi_unittest.cc ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a87a377533495019589c43ce75aba9ad7924ecb4 100644
--- a/sync/internal_api/write_node.h
+++ b/sync/internal_api/write_node.h
@@ -46,6 +46,18 @@ class WriteTransaction;
// syncable::MutableEntry. A WriteTransaction is needed to create a WriteNode.
class WriteNode : public BaseNode {
public:
+ 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 +87,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,
« no previous file with comments | « sync/internal_api/syncapi_unittest.cc ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698