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

Side by Side Diff: components/sync/syncable/directory.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/sync/syncable/directory.h" 5 #include "components/sync/syncable/directory.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 return; 1493 return;
1494 } 1494 }
1495 1495
1496 EntryKernel* successor = *neighbour; 1496 EntryKernel* successor = *neighbour;
1497 1497
1498 // Another mixed valid and invalid position case. This one could be supported 1498 // Another mixed valid and invalid position case. This one could be supported
1499 // in theory, but we're trying to deprecate support for siblings with and 1499 // in theory, but we're trying to deprecate support for siblings with and
1500 // without valid positions. See TODO above. 1500 // without valid positions. See TODO above.
1501 // Using a release CHECK here because the following UniquePosition::Between 1501 // Using a release CHECK here because the following UniquePosition::Between
1502 // call crashes anyway when the position string is empty (see crbug/332371). 1502 // call crashes anyway when the position string is empty (see crbug/332371).
1503 CHECK(successor->ref(UNIQUE_POSITION).IsValid()) << *successor; 1503 CHECK(successor->ref(UNIQUE_POSITION).IsValid());
1504 1504
1505 // Finally, the normal case: inserting between two elements. 1505 // Finally, the normal case: inserting between two elements.
1506 UniquePosition pos = 1506 UniquePosition pos =
1507 UniquePosition::Between(predecessor->ref(UNIQUE_POSITION), 1507 UniquePosition::Between(predecessor->ref(UNIQUE_POSITION),
1508 successor->ref(UNIQUE_POSITION), suffix); 1508 successor->ref(UNIQUE_POSITION), suffix);
1509 e->put(UNIQUE_POSITION, pos); 1509 e->put(UNIQUE_POSITION, pos);
1510 return; 1510 return;
1511 } 1511 }
1512 1512
1513 // TODO(rlarocque): Avoid this indirection. Just return the set. 1513 // TODO(rlarocque): Avoid this indirection. Just return the set.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 Directory::Kernel* Directory::kernel() { 1592 Directory::Kernel* Directory::kernel() {
1593 return kernel_; 1593 return kernel_;
1594 } 1594 }
1595 1595
1596 const Directory::Kernel* Directory::kernel() const { 1596 const Directory::Kernel* Directory::kernel() const {
1597 return kernel_; 1597 return kernel_;
1598 } 1598 }
1599 1599
1600 } // namespace syncable 1600 } // namespace syncable
1601 } // namespace syncer 1601 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698