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