Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/browser/language_order_table_model.cc

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/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"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (observer_) 104 if (observer_)
105 observer_->OnItemsChanged(0, RowCount()); 105 observer_->OnItemsChanged(0, RowCount());
106 } 106 }
107 107
108 int LanguageOrderTableModel::RowCount() { 108 int LanguageOrderTableModel::RowCount() {
109 return static_cast<int>(languages_.size()); 109 return static_cast<int>(languages_.size());
110 } 110 }
111 111
112 void LanguageOrderTableModel::ListToVector(const std::string& list, 112 void LanguageOrderTableModel::ListToVector(const std::string& list,
113 std::vector<std::string>* vector) { 113 std::vector<std::string>* vector) {
114 SplitString(list, ',', vector); 114 base::SplitString(list, ',', vector);
115 } 115 }
116 116
117 std::string LanguageOrderTableModel::VectorToList( 117 std::string LanguageOrderTableModel::VectorToList(
118 const std::vector<std::string>& vector) { 118 const std::vector<std::string>& vector) {
119 std::string list; 119 std::string list;
120 for (int i = 0 ; i < static_cast<int>(vector.size()) ; i++) { 120 for (int i = 0 ; i < static_cast<int>(vector.size()) ; i++) {
121 list += vector.at(i); 121 list += vector.at(i);
122 if (i != static_cast<int>(vector.size()) - 1) 122 if (i != static_cast<int>(vector.size()) - 1)
123 list += ','; 123 list += ',';
124 } 124 }
125 return list; 125 return list;
126 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/language_combobox_model.cc ('k') | chrome/browser/password_manager/password_form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698