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

Unified Diff: chrome/browser/sxs_linux.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
Index: chrome/browser/sxs_linux.cc
diff --git a/chrome/browser/sxs_linux.cc b/chrome/browser/sxs_linux.cc
index 299069366b2ae3bd37e6e632675644ff14a62bf1..5ab67ae6302442bdc4dcd28b04e6de65c538b4f7 100644
--- a/chrome/browser/sxs_linux.cc
+++ b/chrome/browser/sxs_linux.cc
@@ -68,8 +68,10 @@ bool DoAddChannelMarkToUserDataDir(const base::FilePath& user_data_dir) {
// and legitimate that it doesn't exist, e.g. for new profile or for profile
// existing before channel marks have been introduced.
std::string channels_contents;
- if (base::ReadFileToString(channels_path, &channels_contents))
- base::SplitString(channels_contents, '\n', &user_data_dir_channels);
+ if (base::ReadFileToString(channels_path, &channels_contents)) {
+ base::SplitString(channels_contents, "\n",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ }
if (std::find(user_data_dir_channels.begin(),
user_data_dir_channels.end(),
@@ -126,8 +128,8 @@ int MigrateUserDataDir() {
return chrome::RESULT_CODE_SXS_MIGRATION_FAILED;
}
- std::vector<std::string> user_data_dir_channels;
- base::SplitString(channels_contents, '\n', &user_data_dir_channels);
+ std::vector<std::string> user_data_dir_channels = base::SplitString(
+ channels_contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (user_data_dir_channels.size() != 1) {
LOG(WARNING) << "User data dir migration is only possible when the profile "
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_whitelist_service.cc ('k') | chrome/browser/themes/theme_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698