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

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: 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
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 return false;
akalin 2011/10/15 00:21:24 maybe add NOTREACHED() so that it crashes on debug
lipalani1 2011/10/15 00:36:31 Done.
120 } 121 }
121 122
122 if (backup->ref(syncable::PREV_ID) != entry.Get(syncable::PREV_ID)) 123 if (backup->ref(syncable::PREV_ID) != entry.Get(syncable::PREV_ID))
123 return false; 124 return false;
124 125
125 entry.Put(syncable::CTIME, backup->ref(syncable::CTIME)); 126 entry.Put(syncable::CTIME, backup->ref(syncable::CTIME));
126 entry.Put(syncable::MTIME, backup->ref(syncable::MTIME)); 127 entry.Put(syncable::MTIME, backup->ref(syncable::MTIME));
127 entry.Put(syncable::BASE_VERSION, backup->ref(syncable::BASE_VERSION)); 128 entry.Put(syncable::BASE_VERSION, backup->ref(syncable::BASE_VERSION));
128 entry.Put(syncable::IS_DIR, backup->ref(syncable::IS_DIR)); 129 entry.Put(syncable::IS_DIR, backup->ref(syncable::IS_DIR));
129 entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL)); 130 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; 400 LocallyDeletedPathChecker checker;
400 if (!checker.CausingConflict(parent, *entry)) 401 if (!checker.CausingConflict(parent, *entry))
401 return; 402 return;
402 conflict_progress->MergeSets(entry->Get(syncable::ID), 403 conflict_progress->MergeSets(entry->Get(syncable::ID),
403 parent.Get(syncable::ID)); 404 parent.Get(syncable::ID));
404 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker); 405 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker);
405 } 406 }
406 } 407 }
407 408
408 } // namespace browser_sync 409 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698