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

Side by Side Diff: chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc

Issue 8298016: Making some CHECK statements to NOTREACHED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/sync/engine/process_commit_response_command.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h" 5 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <sstream> 9 #include <sstream>
10 #include <vector> 10 #include <vector>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 backup->ref(syncable::META_HANDLE)); 109 backup->ref(syncable::META_HANDLE));
110 CHECK(entry.good()); 110 CHECK(entry.good());
111 111
112 if (!entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL))) 112 if (!entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL)))
113 return false; 113 return false;
114 114
115 entry.Put(syncable::NON_UNIQUE_NAME, backup->ref(syncable::NON_UNIQUE_NAME)); 115 entry.Put(syncable::NON_UNIQUE_NAME, backup->ref(syncable::NON_UNIQUE_NAME));
116 entry.Put(syncable::PARENT_ID, backup->ref(syncable::PARENT_ID)); 116 entry.Put(syncable::PARENT_ID, backup->ref(syncable::PARENT_ID));
117 117
118 if (!backup->ref(syncable::IS_DEL)) { 118 if (!backup->ref(syncable::IS_DEL)) {
119 CHECK(entry.PutPredecessor(backup->ref(syncable::PREV_ID))); 119 if (!entry.PutPredecessor(backup->ref(syncable::PREV_ID))) {
120 // TODO(lipalani) : Propagate the error to caller. crbug.com/100444.
121 NOTREACHED();
122 }
120 } 123 }
121 124
122 if (backup->ref(syncable::PREV_ID) != entry.Get(syncable::PREV_ID)) 125 if (backup->ref(syncable::PREV_ID) != entry.Get(syncable::PREV_ID))
123 return false; 126 return false;
124 127
125 entry.Put(syncable::CTIME, backup->ref(syncable::CTIME)); 128 entry.Put(syncable::CTIME, backup->ref(syncable::CTIME));
126 entry.Put(syncable::MTIME, backup->ref(syncable::MTIME)); 129 entry.Put(syncable::MTIME, backup->ref(syncable::MTIME));
127 entry.Put(syncable::BASE_VERSION, backup->ref(syncable::BASE_VERSION)); 130 entry.Put(syncable::BASE_VERSION, backup->ref(syncable::BASE_VERSION));
128 entry.Put(syncable::IS_DIR, backup->ref(syncable::IS_DIR)); 131 entry.Put(syncable::IS_DIR, backup->ref(syncable::IS_DIR));
129 entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL)); 132 entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL));
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 LocallyDeletedPathChecker checker; 402 LocallyDeletedPathChecker checker;
400 if (!checker.CausingConflict(parent, *entry)) 403 if (!checker.CausingConflict(parent, *entry))
401 return; 404 return;
402 conflict_progress->MergeSets(entry->Get(syncable::ID), 405 conflict_progress->MergeSets(entry->Get(syncable::ID),
403 parent.Get(syncable::ID)); 406 parent.Get(syncable::ID));
404 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker); 407 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker);
405 } 408 }
406 } 409 }
407 410
408 } // namespace browser_sync 411 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/process_commit_response_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698