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

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)

Created:
10 years, 5 months ago by Evan Martin
Modified:
9 years, 7 months ago
Reviewers:
viettrungluu
CC:
chromium-reviews, cbentzel+watch_chromium.org, ben+cc_chromium.org, Erik does not do reviews, brettw-cc_chromium.org, jam, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., kuchhal, darin-cc_chromium.org, native-client-reviews_googlegroups.com, amit
Visibility:
Public.

Description

CommandLine: add a CopySwitchesFrom() and AppendSwitchPath() These are two common patterns in Chrome code: copying a subset of switches from one CommandLine to another, and appending a FilePath to a CommandLine. This sets me up to do a lot more deprecation in a follow-up change. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54218

Patch Set 1 #

Patch Set 2 : ok #

Total comments: 14

Patch Set 3 : rebase #

Patch Set 4 : rearrange it all #

Patch Set 5 : minor cleanups #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -222 lines) Patch
M base/command_line.h View 1 2 3 4 3 chunks +15 lines, -6 lines 0 comments Download
M base/command_line.cc View 1 2 3 4 5 chunks +44 lines, -10 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/browser_uitest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/configuration_policy_pref_store_unittest.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_startup_browsertest.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_uitest.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/first_run_win.cc View 1 2 3 2 chunks +7 lines, -15 lines 0 comments Download
M chrome/browser/gpu_process_host.h View 1 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/gpu_process_host.cc View 2 chunks +7 lines, -31 lines 0 comments Download
M chrome/browser/jumplist_win.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/nacl_host/nacl_broker_host_win.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context_unittest.cc View 1 chunk +7 lines, -7 lines 0 comments Download
M chrome/browser/plugin_process_host.cc View 1 2 3 3 chunks +8 lines, -15 lines 0 comments Download
M chrome/browser/pref_service_uitest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/printing/printing_layout_uitest.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/process_singleton_uitest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profile_import_process_host.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 5 chunks +6 lines, -14 lines 0 comments Download
M chrome/browser/utility_process_host.cc View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/worker_host/worker_process_host.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/zygote_host_linux.cc View 1 2 3 1 chunk +2 lines, -9 lines 0 comments Download
M chrome/common/nacl_cmd_line.cc View 2 chunks +3 lines, -9 lines 0 comments Download
M chrome/renderer/renderer_main_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/service/service_utility_process_host.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/automation/automation_proxy_uitest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/in_process_browser_test.cc View 1 2 3 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/test/memory_test/memory_test.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/nacl/nacl_sandbox_test.cc View 1 2 3 1 chunk +6 lines, -8 lines 0 comments Download
M chrome/test/page_cycler/page_cycler_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/plugin/plugin_test.cpp View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/ui/npapi_test_helper.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/ui/ppapi_uitest.cc View 1 2 3 1 chunk +4 lines, -9 lines 0 comments Download
M chrome/test/ui/sandbox_uitests.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/ui/ui_test.cc View 1 2 3 5 chunks +7 lines, -12 lines 0 comments Download
M chrome/test/ui_test_utils.cc View 1 2 3 2 chunks +3 lines, -5 lines 0 comments Download
M chrome_frame/chrome_frame_automation.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M chrome_frame/chrome_launcher_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/chrome_tab.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Evan Martin
sorry to pick you, but i'm trying to balance who i annoy with this
10 years, 4 months ago (2010-07-29 00:56:15 UTC) #1
Evan Martin
ping. let me know if i should find someone else.
10 years, 4 months ago (2010-07-29 18:39:22 UTC) #2
viettrungluu
Oops. I started looking at it, and then forgot about it. Sorry about that. I'll ...
10 years, 4 months ago (2010-07-29 18:41:35 UTC) #3
viettrungluu
Mostly looks good -- my biggest concern is the name/overloading of AppendSwitch(). http://codereview.chromium.org/3012021/diff/2001/3002 File base/command_line.h ...
10 years, 4 months ago (2010-07-29 19:01:03 UTC) #4
Evan Martin
http://codereview.chromium.org/3012021/diff/2001/3002 File base/command_line.h (right): http://codereview.chromium.org/3012021/diff/2001/3002#newcode163 base/command_line.h:163: void AppendSwitch(const std::string& switch_string, const FilePath& path); On 2010/07/29 ...
10 years, 4 months ago (2010-07-29 19:12:02 UTC) #5
viettrungluu
http://codereview.chromium.org/3012021/diff/2001/3002 File base/command_line.h (right): http://codereview.chromium.org/3012021/diff/2001/3002#newcode163 base/command_line.h:163: void AppendSwitch(const std::string& switch_string, const FilePath& path); On 2010/07/29 ...
10 years, 4 months ago (2010-07-29 19:44:01 UTC) #6
Evan Martin
ok, please look again. I unified into the pattern of having APIs like GetFooPath() GetFooNative() ...
10 years, 4 months ago (2010-07-29 21:47:53 UTC) #7
viettrungluu
10 years, 4 months ago (2010-07-29 22:04:11 UTC) #8
Thanks!

LGTM.

On 2010/07/29 21:47:53, Evan Martin wrote:
> ok, please look again.
> 
> I unified into the pattern of having APIs like
>   GetFooPath()
>   GetFooNative()
> and
>   SetFooPath()
>   SetFooNative()
> 
> For the different types, as recommended by the style guide.
> I will be able to grep for "WithValue()" to remove all of the remaining
(wrong)
> callers.

Powered by Google App Engine
This is Rietveld 408576698