Index: chrome/browser/chromeos/file_manager/file_tasks.cc |
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.cc b/chrome/browser/chromeos/file_manager/file_tasks.cc |
index b70c7b7d0c0d5c066db4977af9e81cbe960769c5..4f07a6ad02f0f70a7c85e5b1ef15da58b10c0276 100644 |
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc |
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc |
@@ -8,6 +8,7 @@ |
#include "base/bind.h" |
#include "base/prefs/pref_service.h" |
#include "base/prefs/scoped_user_pref_update.h" |
+#include "base/strings/string_split.h" |
#include "base/strings/stringprintf.h" |
#include "chrome/browser/chromeos/drive/file_system_util.h" |
#include "chrome/browser/chromeos/drive/file_task_executor.h" |
@@ -221,13 +222,13 @@ std::string TaskDescriptorToId(const TaskDescriptor& task_descriptor) { |
bool ParseTaskID(const std::string& task_id, TaskDescriptor* task) { |
DCHECK(task); |
- std::vector<std::string> result; |
- int count = Tokenize(task_id, std::string("|"), &result); |
+ std::vector<std::string> result = base::SplitString( |
+ task_id, "|", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); |
// Parse a legacy task ID that only contain two parts. Drive tasks are |
// identified by a prefix "drive-app:" on the extension ID. The legacy task |
// IDs can be stored in preferences. |
- if (count == 2) { |
+ if (result.size() == 2) { |
if (base::StartsWithASCII(result[0], kDriveTaskExtensionPrefix, true)) { |
task->task_type = TASK_TYPE_DRIVE_APP; |
task->app_id = result[0].substr(kDriveTaskExtensionPrefixLength); |
@@ -241,7 +242,7 @@ bool ParseTaskID(const std::string& task_id, TaskDescriptor* task) { |
return true; |
} |
- if (count != 3) |
+ if (result.size() != 3) |
return false; |
TaskType task_type = StringToTaskType(result[1]); |