| Index: chrome/browser/supervised_user/supervised_user_whitelist_service.cc
|
| diff --git a/chrome/browser/supervised_user/supervised_user_whitelist_service.cc b/chrome/browser/supervised_user/supervised_user_whitelist_service.cc
|
| index 9619f3de896e29f023b5573a9c9eb83802051c6e..c688abe35f3bed99174dcad6b445349b4ce7410c 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_whitelist_service.cc
|
| +++ b/chrome/browser/supervised_user/supervised_user_whitelist_service.cc
|
| @@ -71,17 +71,17 @@ void SupervisedUserWhitelistService::Init() {
|
| base::CommandLine::ForCurrentProcess();
|
| std::string command_line_whitelists = command_line->GetSwitchValueASCII(
|
| switches::kInstallSupervisedUserWhitelists);
|
| - std::vector<std::string> split_whitelists;
|
| - base::SplitString(command_line_whitelists, ',', &split_whitelists);
|
| - for (const std::string& whitelist : split_whitelists) {
|
| + for (const base::StringPiece& whitelist : base::SplitStringPiece(
|
| + command_line_whitelists, ",",
|
| + base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
|
| std::string id;
|
| std::string name;
|
| size_t separator = whitelist.find(':');
|
| - if (separator != std::string::npos) {
|
| - id = whitelist.substr(0, separator);
|
| - name = whitelist.substr(separator + 1);
|
| + if (separator != base::StringPiece::npos) {
|
| + whitelist.substr(0, separator).CopyToString(&id);
|
| + whitelist.substr(separator + 1).CopyToString(&name);
|
| } else {
|
| - id = whitelist;
|
| + whitelist.CopyToString(&id);
|
| }
|
|
|
| // Skip whitelists that were already registered.
|
|
|