| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Copied from strings/stringpiece.cc with modifications | 4 // Copied from strings/stringpiece.cc with modifications |
| 5 | 5 |
| 6 #include "base/strings/string_piece.h" | 6 #include "base/strings/string_piece.h" |
| 7 | 7 |
| 8 #include <limits.h> |
| 9 |
| 8 #include <algorithm> | 10 #include <algorithm> |
| 9 #include <ostream> | 11 #include <ostream> |
| 10 | 12 |
| 11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 12 | 14 |
| 13 namespace base { | 15 namespace base { |
| 14 namespace { | 16 namespace { |
| 15 | 17 |
| 16 // For each character in characters_wanted, sets the index corresponding | 18 // For each character in characters_wanted, sets the index corresponding |
| 17 // to the ASCII code of that character to 1 in table. This is used by | 19 // to the ASCII code of that character to 1 in table. This is used by |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 DCHECK(begin <= end) << "StringPiece iterators swapped or invalid."; | 443 DCHECK(begin <= end) << "StringPiece iterators swapped or invalid."; |
| 442 } | 444 } |
| 443 void AssertIteratorsInOrder(string16::const_iterator begin, | 445 void AssertIteratorsInOrder(string16::const_iterator begin, |
| 444 string16::const_iterator end) { | 446 string16::const_iterator end) { |
| 445 DCHECK(begin <= end) << "StringPiece iterators swapped or invalid."; | 447 DCHECK(begin <= end) << "StringPiece iterators swapped or invalid."; |
| 446 } | 448 } |
| 447 #endif | 449 #endif |
| 448 | 450 |
| 449 } // namespace internal | 451 } // namespace internal |
| 450 } // namespace base | 452 } // namespace base |
| OLD | NEW |