| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/tools/dump_cache/url_to_filename_encoder.h" | 5 #include "net/tools/dump_cache/url_to_filename_encoder.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string_piece.h" | |
| 11 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 12 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| 12 #include "base/strings/string_piece.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 using base::StringPiece; | 15 using base::StringPiece; |
| 16 using std::string; | 16 using std::string; |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 #ifdef WIN32 | 20 #ifdef WIN32 |
| 21 char kDirSeparator = '\\'; | 21 char kDirSeparator = '\\'; |
| 22 char kOtherDirSeparator = '/'; | 22 char kOtherDirSeparator = '/'; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 EXPECT_EQ(long_word.size() + 4, escaped_word.size()); | 336 EXPECT_EQ(long_word.size() + 4, escaped_word.size()); |
| 337 ASSERT_LT(UrlToFilenameEncoder::kMaximumSubdirectoryLength, | 337 ASSERT_LT(UrlToFilenameEncoder::kMaximumSubdirectoryLength, |
| 338 escaped_word.size()); | 338 escaped_word.size()); |
| 339 // Check that the backslash got inserted at the correct spot. | 339 // Check that the backslash got inserted at the correct spot. |
| 340 EXPECT_EQ('\\', escaped_word[ | 340 EXPECT_EQ('\\', escaped_word[ |
| 341 UrlToFilenameEncoder::kMaximumSubdirectoryLength]); | 341 UrlToFilenameEncoder::kMaximumSubdirectoryLength]); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace net | 344 } // namespace net |
| 345 | 345 |
| OLD | NEW |