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

Unified Diff: chrome/browser/sync/glue/bookmark_change_processor.cc

Issue 10105006: sync: sprinkle extra asserts to hunt down bug 121587 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/bookmark_change_processor.cc
diff --git a/chrome/browser/sync/glue/bookmark_change_processor.cc b/chrome/browser/sync/glue/bookmark_change_processor.cc
index f7434476ff987d758b375c51aa629c89f6fb36d4..bc0cd154e1ae167977d2d2c44790a569f977d87b 100644
--- a/chrome/browser/sync/glue/bookmark_change_processor.cc
+++ b/chrome/browser/sync/glue/bookmark_change_processor.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/sync/internal_api/write_transaction.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "content/public/browser/browser_thread.h"
+#include "sync/syncable/syncable.h" // TODO(tim): Investigating bug 121587.
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/png_codec.h"
@@ -214,8 +215,22 @@ void BookmarkChangeProcessor::BookmarkNodeChanged(BookmarkModel* model,
// Lookup the sync node that's associated with |node|.
sync_api::WriteNode sync_node(&trans);
if (!model_associator_->InitSyncNodeFromChromeId(node->id(), &sync_node)) {
- error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
- std::string());
+ // TODO(tim): Investigating bug 121587.
+ if (model_associator_->GetSyncIdFromChromeId(node->id()) ==
+ sync_api::kInvalidId) {
+ error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
+ "Bookmark id not found in model associator on BookmarkNodeChanged");
+ } else if (!sync_node.GetEntry()->good()) {
+ error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
+ "Could not InitByIdLookup on BookmarkNodeChanged, good() failed");
+ } else if (sync_node.GetEntry()->Get(::syncable::IS_DEL)) {
+ error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
+ "Could not InitByIdLookup on BookmarkNodeChanged, is_del true");
+ } else {
+ error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
+ "Could not InitByIdLookup on BookmarkNodeChanged, "
+ " DecryptIfNecessary failed");
+ }
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698