OLD | NEW |
1 // Copyright (c) 2009 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/browser/language_order_table_model.h" | 5 #include "chrome/browser/language_order_table_model.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/table_model_observer.h" | 10 #include "app/table_model_observer.h" |
| 11 #include "base/string_split.h" |
11 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
13 | 14 |
14 LanguageOrderTableModel::LanguageOrderTableModel() | 15 LanguageOrderTableModel::LanguageOrderTableModel() |
15 : observer_(NULL) { | 16 : observer_(NULL) { |
16 } | 17 } |
17 | 18 |
18 void LanguageOrderTableModel::SetAcceptLanguagesString( | 19 void LanguageOrderTableModel::SetAcceptLanguagesString( |
19 const std::string& language_list) { | 20 const std::string& language_list) { |
20 std::vector<std::string> languages_vector; | 21 std::vector<std::string> languages_vector; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 std::string LanguageOrderTableModel::VectorToList( | 117 std::string LanguageOrderTableModel::VectorToList( |
117 const std::vector<std::string>& vector) { | 118 const std::vector<std::string>& vector) { |
118 std::string list; | 119 std::string list; |
119 for (int i = 0 ; i < static_cast<int>(vector.size()) ; i++) { | 120 for (int i = 0 ; i < static_cast<int>(vector.size()) ; i++) { |
120 list += vector.at(i); | 121 list += vector.at(i); |
121 if (i != static_cast<int>(vector.size()) - 1) | 122 if (i != static_cast<int>(vector.size()) - 1) |
122 list += ','; | 123 list += ','; |
123 } | 124 } |
124 return list; | 125 return list; |
125 } | 126 } |
OLD | NEW |