summaryrefslogtreecommitdiffstats
path: root/win8/metro_driver/file_picker_ash.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-06 16:53:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-06 23:54:14 +0000
commit8cc24ae2b51f9db4a16011eb1ab7dbfca0eb6d54 (patch)
tree876a4d239206096f180630fc3657a1aa58a74630 /win8/metro_driver/file_picker_ash.cc
parentf359166a9a5dc5c4ea15b0b718b643fc06d3c870 (diff)
downloadchromium_src-8cc24ae2b51f9db4a16011eb1ab7dbfca0eb6d54.zip
chromium_src-8cc24ae2b51f9db4a16011eb1ab7dbfca0eb6d54.tar.gz
chromium_src-8cc24ae2b51f9db4a16011eb1ab7dbfca0eb6d54.tar.bz2
Replace remaining Tokenize calls to SplitString
SplitString is now more general and does the job of Tokenize with specific parameters. The biggest change is in time_util.cc where the old return pattern better matched how the code was structured. With the new style the conditionals are more nested. Some simple cases were changed to StringPieces when copies were not required. BUG=506920, 506255 Review URL: https://codereview.chromium.org/1219263002 Cr-Commit-Position: refs/heads/master@{#337520}
Diffstat (limited to 'win8/metro_driver/file_picker_ash.cc')
-rw-r--r--win8/metro_driver/file_picker_ash.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/win8/metro_driver/file_picker_ash.cc b/win8/metro_driver/file_picker_ash.cc
index e45301c..a420b53 100644
--- a/win8/metro_driver/file_picker_ash.cc
+++ b/win8/metro_driver/file_picker_ash.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/win/metro.h"
@@ -239,9 +240,8 @@ HRESULT OpenFilePickerSession::StartFilePicker() {
break;
// There can be a single extension, or a list of semicolon-separated ones.
- std::vector<base::string16> extensions_win32_style;
- size_t extension_count = Tokenize(walk, L";", &extensions_win32_style);
- DCHECK_EQ(extension_count, extensions_win32_style.size());
+ std::vector<base::string16> extensions_win32_style = base::SplitString(
+ walk, L";", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
// Metro wants suffixes only, not patterns.
mswrw::HString extension;
@@ -421,9 +421,8 @@ HRESULT SaveFilePickerSession::StartFilePicker() {
break;
// There can be a single extension, or a list of semicolon-separated ones.
- std::vector<base::string16> extensions_win32_style;
- size_t extension_count = Tokenize(walk, L";", &extensions_win32_style);
- DCHECK_EQ(extension_count, extensions_win32_style.size());
+ std::vector<base::string16> extensions_win32_style = base::SplitString(
+ walk, L";", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
// Metro wants suffixes only, not patterns. Also, metro does not support
// the all files ("*") pattern in the save picker.