Use base::StringTokenizer::token_piece() when std::string is not needed.

base::StringTokenizer::token() creates a new std::string each time. Many
callers do not even need a std::string, so just update them to use
token_piece() instead.

This CL was uploaded by git cl split.

[email protected]

Bug: 1199547
Change-Id: I4a17b42d53d9ff60387560f026204229ea59f240
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2832864
Commit-Queue: Daniel Cheng <[email protected]>
Auto-Submit: Daniel Cheng <[email protected]>
Reviewed-by: Thomas Anderson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#873852}
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index c067dec..1e7552bf 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -304,8 +304,7 @@
   if (env->GetVar("XDG_DATA_DIRS", &xdg_data_dirs) && !xdg_data_dirs.empty()) {
     base::StringTokenizer tokenizer(xdg_data_dirs, ":");
     while (tokenizer.GetNext()) {
-      base::FilePath data_dir(tokenizer.token());
-      search_paths.push_back(data_dir);
+      search_paths.emplace_back(tokenizer.token_piece());
     }
   } else {
     search_paths.push_back(base::FilePath("/usr/local/share"));