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

Issue 3134008: CommandLine: eliminate wstring-accepting AppendLooseValue (Closed)

Created:
10 years, 4 months ago by Evan Martin
Modified:
9 years, 7 months ago
Reviewers:
viettrungluu
CC:
chromium-reviews, cbentzel+watch_chromium.org, nkostylev+cc_chromium.org, ben+cc_chromium.org, amit, brettw-cc_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., pam+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

CommandLine: eliminate wstring-accepting AppendLooseValue Instead use AppendArg variants which accept a FilePath or an ASCII string. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56100

Patch Set 1 #

Total comments: 1

Patch Set 2 : rename everything to include type in function name #

Patch Set 3 : fix #

Total comments: 3

Patch Set 4 : utf8 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -52 lines) Patch
M base/command_line.h View 1 2 3 1 chunk +8 lines, -2 lines 0 comments Download
M base/command_line.cc View 1 2 3 3 chunks +16 lines, -6 lines 2 comments Download
M base/process_util_unittest.cc View 2 3 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/app/chrome_main_uitest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_init_browsertest.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/login/apply_services_customization.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/existing_user_controller.cc View 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/login_screen.cc View 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/process_singleton_linux_uitest.cc View 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/sandbox_policy.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
chrome/test/automation/automation_proxy_uitest.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/startup/startup_test.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/ui/ui_test.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/test/ui_test_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/test/chrome_frame_test_utils.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M net/disk_cache/stress_cache.cc View 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/tools/crash_cache/crash_cache.cc View 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
Evan Martin
10 years, 4 months ago (2010-08-11 19:50:17 UTC) #1
viettrungluu
http://codereview.chromium.org/3134008/diff/1/3 File base/command_line.h (right): http://codereview.chromium.org/3134008/diff/1/3#newcode160 base/command_line.h:160: void AppendArg(const std::string& value); What encoding does this std::string ...
10 years, 4 months ago (2010-08-11 19:53:56 UTC) #2
Evan Martin
On 2010/08/11 19:53:56, viettrungluu wrote: > base/command_line.h:160: void AppendArg(const std::string& value); > What encoding does ...
10 years, 4 months ago (2010-08-11 19:55:06 UTC) #3
viettrungluu
On 2010/08/11 19:55:06, Evan Martin wrote: > On 2010/08/11 19:53:56, viettrungluu wrote: > > base/command_line.h:160: ...
10 years, 4 months ago (2010-08-11 19:58:14 UTC) #4
Evan Martin
On 2010/08/11 19:58:14, viettrungluu wrote: > If it's restricted to ASCII, I think we should ...
10 years, 4 months ago (2010-08-11 20:34:50 UTC) #5
viettrungluu
On 2010/08/11 20:34:50, Evan Martin wrote: > That would require explicitly converting a wstring to ...
10 years, 4 months ago (2010-08-12 02:35:08 UTC) #6
Evan Martin
Please take another look.
10 years, 4 months ago (2010-08-12 21:17:18 UTC) #7
Evan Martin
Ping.
10 years, 4 months ago (2010-08-13 00:03:53 UTC) #8
viettrungluu
I'm a little worried about passing URLs on the command-line (see below). How bad would ...
10 years, 4 months ago (2010-08-13 00:42:34 UTC) #9
Evan Martin
On 2010/08/13 00:42:34, viettrungluu wrote: > I'm a little worried about passing URLs on the ...
10 years, 4 months ago (2010-08-13 18:56:38 UTC) #10
viettrungluu
On 2010/08/13 18:56:38, Evan Martin wrote: > On 2010/08/13 00:42:34, viettrungluu wrote: > > I'm ...
10 years, 4 months ago (2010-08-13 19:38:27 UTC) #11
Evan Martin
ok, new patch up with UTF8 version
10 years, 4 months ago (2010-08-13 20:46:03 UTC) #12
viettrungluu
10 years, 4 months ago (2010-08-13 20:52:58 UTC) #13
LGTM with a couple of extra DCHECK()s. Thanks!

http://codereview.chromium.org/3134008/diff/17001/18001
File base/command_line.cc (right):

http://codereview.chromium.org/3134008/diff/17001/18001#newcode426
base/command_line.cc:426: AppendArgNative(UTF8ToWide(value));
Could you add a |DCHECK(IsStringUTF8(value));| here?

http://codereview.chromium.org/3134008/diff/17001/18001#newcode478
base/command_line.cc:478: AppendArgNative(value);
Ditto.

Powered by Google App Engine
This is Rietveld 408576698