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

Issue 532023003: [Profiles] Trim profile names in chrome://settings (Closed)

Created:
6 years, 3 months ago by noms (inactive)
Modified:
6 years, 3 months ago
Reviewers:
Dan Beam
CC:
chromium-reviews, dbeam+watch-options_chromium.org, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Profiles] Trim profile names in chrome://settings And validate them accordingly (all-space names are still empty and invalid). BUG=405913 TEST=Go to chrome://settings. Try to enter " " for the profile name. The textbox should stay red. Enter " batman " for the profile name, and save. The name should be saved as just "batman". Expect some bat signals. Committed: https://crrev.com/242124e818794d0d64fb001466795863abe37374 Cr-Commit-Position: refs/heads/master@{#293571}

Patch Set 1 #

Total comments: 1

Patch Set 2 : review comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M chrome/browser/resources/options/manage_profile_overlay.html View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/create_profile_handler.cc View 1 2 chunks +2 lines, -0 lines 2 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 1 2 chunks +2 lines, -0 lines 2 comments Download

Messages

Total messages: 12 (2 generated)
noms (inactive)
Hi Dan, Trimming ALL the profile names. Please take a look. Thanks!
6 years, 3 months ago (2014-09-03 15:06:38 UTC) #2
noms (inactive)
Ping!
6 years, 3 months ago (2014-09-04 19:14:16 UTC) #3
Dan Beam
why can't we just put pattern=".*\S.*" on the <input> and trim in C++? https://codereview.chromium.org/532023003/diff/1/chrome/browser/resources/options/manage_profile_overlay.js File ...
6 years, 3 months ago (2014-09-04 23:06:07 UTC) #4
noms (inactive)
Oh, I didn't know patterns were an option. :/ Took your suggestion, moved the trimming ...
6 years, 3 months ago (2014-09-05 15:34:14 UTC) #5
Dan Beam
lgtm
6 years, 3 months ago (2014-09-05 17:57:33 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noms@chromium.org/532023003/20001
6 years, 3 months ago (2014-09-05 19:01:27 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 7d2c22788eb96cbb8e30689d7c2e8de8a6f0c753
6 years, 3 months ago (2014-09-05 20:05:27 UTC) #9
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/242124e818794d0d64fb001466795863abe37374 Cr-Commit-Position: refs/heads/master@{#293571}
6 years, 3 months ago (2014-09-10 03:41:15 UTC) #10
Dan Beam
probably should've done this (or should do it at a lower level when creating profiles) ...
6 years, 3 months ago (2014-09-11 17:54:08 UTC) #11
noms (inactive)
6 years, 3 months ago (2014-09-15 21:12:26 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/532023003/diff/20001/chrome/browser/ui/webui/...
File chrome/browser/ui/webui/options/create_profile_handler.cc (right):

https://codereview.chromium.org/532023003/diff/20001/chrome/browser/ui/webui/...
chrome/browser/ui/webui/options/create_profile_handler.cc:84:
base::TrimWhitespace(name, base::TRIM_ALL, &name);
On 2014/09/11 17:54:08, Dan Beam wrote:
> CHECK(!name.empty());

Done in https://codereview.chromium.org/562233002.

https://codereview.chromium.org/532023003/diff/20001/chrome/browser/ui/webui/...
File chrome/browser/ui/webui/options/manage_profile_handler.cc (right):

https://codereview.chromium.org/532023003/diff/20001/chrome/browser/ui/webui/...
chrome/browser/ui/webui/options/manage_profile_handler.cc:385:
base::TrimWhitespace(new_profile_name, base::TRIM_ALL, &new_profile_name);
On 2014/09/11 17:54:08, Dan Beam wrote:
> CHECK(!new_profile_name.empty());

Done in https://codereview.chromium.org/562233002.

Powered by Google App Engine
This is Rietveld 408576698