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 | 4 |
5 #include "chrome/browser/character_encoding.h" | 5 #include "chrome/browser/character_encoding.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <map> | 9 #include <map> |
8 #include <set> | 10 #include <set> |
9 | 11 |
10 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
12 #include "base/strings/string_tokenizer.h" | 15 #include "base/strings/string_tokenizer.h" |
13 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/app/chrome_command_ids.h" | 18 #include "chrome/app/chrome_command_ids.h" |
16 #include "chrome/grit/generated_resources.h" | 19 #include "chrome/grit/generated_resources.h" |
17 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
18 #include "third_party/icu/source/common/unicode/ucnv.h" | 21 #include "third_party/icu/source/common/unicode/ucnv.h" |
19 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
20 #include "ui/base/l10n/l10n_util_collator.h" | 23 #include "ui/base/l10n/l10n_util_collator.h" |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 // Insert new encoding to head of selected encoding list. | 522 // Insert new encoding to head of selected encoding list. |
520 *selected_encodings = encoding_name; | 523 *selected_encodings = encoding_name; |
521 // Generate the string for rest selected encoding list. | 524 // Generate the string for rest selected encoding list. |
522 for (std::vector<int>::const_iterator it = selected_encoding_list.begin(); | 525 for (std::vector<int>::const_iterator it = selected_encoding_list.begin(); |
523 it != selected_encoding_list.end(); ++it) { | 526 it != selected_encoding_list.end(); ++it) { |
524 selected_encodings->append(1, L','); | 527 selected_encodings->append(1, L','); |
525 selected_encodings->append(GetCanonicalEncodingNameByCommandId(*it)); | 528 selected_encodings->append(GetCanonicalEncodingNameByCommandId(*it)); |
526 } | 529 } |
527 return true; | 530 return true; |
528 } | 531 } |
OLD | NEW |