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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 532023003: [Profiles] Trim profile names in chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 3 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/ui/webui/options/manage_profile_handler.cc
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 41689f80a6da7c7bc0cc5074cfee7277a5f75cda..9bbce8898acda35c55d179954a406857b85f701f 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -9,6 +9,7 @@
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/value_conversions.h"
#include "base/values.h"
@@ -381,6 +382,7 @@ void ManageProfileHandler::SetProfileIconAndName(const base::ListValue* args) {
if (!args->GetString(2, &new_profile_name))
return;
+ base::TrimWhitespace(new_profile_name, base::TRIM_ALL, &new_profile_name);
Dan Beam 2014/09/11 17:54:08 CHECK(!new_profile_name.empty());
noms (inactive) 2014/09/15 21:12:26 Done in https://codereview.chromium.org/562233002.
profiles::UpdateProfileName(profile, new_profile_name);
}

Powered by Google App Engine
This is Rietveld 408576698