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 "chrome/tools/convert_dict/aff_reader.h" | 5 #include "chrome/tools/convert_dict/aff_reader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/i18n/icu_string_conversions.h" | 10 #include "base/i18n/icu_string_conversions.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "base/string_split.h" | 12 #include "base/strings/string_split.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/tools/convert_dict/hunspell_reader.h" | 14 #include "chrome/tools/convert_dict/hunspell_reader.h" |
15 | 15 |
16 namespace convert_dict { | 16 namespace convert_dict { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Returns true if the given line begins with the given case-sensitive | 20 // Returns true if the given line begins with the given case-sensitive |
21 // NULL-terminated ASCII string. | 21 // NULL-terminated ASCII string. |
22 bool StringBeginsWith(const std::string& str, const char* with) { | 22 bool StringBeginsWith(const std::string& str, const char* with) { |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 void AffReader::HandleEncodedCommand(const std::string& line) { | 328 void AffReader::HandleEncodedCommand(const std::string& line) { |
329 std::string utf8; | 329 std::string utf8; |
330 if (!EncodingToUTF8(line, &utf8)) { | 330 if (!EncodingToUTF8(line, &utf8)) { |
331 printf("ERROR: Cannot encode command '%s' to utf8.\n", line.c_str()); | 331 printf("ERROR: Cannot encode command '%s' to utf8.\n", line.c_str()); |
332 exit(1); | 332 exit(1); |
333 } | 333 } |
334 other_commands_.push_back(utf8); | 334 other_commands_.push_back(utf8); |
335 } | 335 } |
336 | 336 |
337 } // namespace convert_dict | 337 } // namespace convert_dict |
OLD | NEW |