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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model_unittest.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/autofill/expanding_textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tabs/tab_strip_model_unittest.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
index cc5323fbcdf44c7c67a76109a73a1b6e600c93b9..dba7d9f2980c25e21af51967cafe62058e53779a 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
@@ -246,11 +246,11 @@ class TabStripModelTest : public ChromeRenderViewHostTestHarness {
model->SetTabPinned(i, true);
ui::ListSelectionModel selection_model;
- std::vector<std::string> selection;
- base::SplitStringAlongWhitespace(selected_tabs, &selection);
- for (size_t i = 0; i < selection.size(); ++i) {
+ for (const base::StringPiece& sel : base::SplitStringPiece(
+ selected_tabs, base::kWhitespaceASCII,
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
int value;
- ASSERT_TRUE(base::StringToInt(selection[i], &value));
+ ASSERT_TRUE(base::StringToInt(sel, &value));
selection_model.AddIndexToSelection(value);
}
selection_model.set_active(selection_model.selected_indices()[0]);
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/autofill/expanding_textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698