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

Issue 22750002: Move AlterEnvironment to base/environment.h, implement on Windows. (Closed)

Created:
7 years, 4 months ago by brettw
Modified:
7 years, 3 months ago
Reviewers:
viettrungluu
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Move AlterEnvironment to base/environment.h, implement on Windows. This re-implements the Posix version to be more like the Windows version and to share some parsing code. The new version will be somewhat slower due to some extra mallocs, but is shorter and more clear. I didn't want to implement a super optimized version on Windows, and the alternative would be to keep the new Windows version and the old Posix version in parallel which seemed less desirable. This changes the input from a vector to a map and just adds the map on the LaunchOptions rather than requiring the caller to set a pointer. This cleans up the callsites somewhat. BUG= R=viettrungluu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220608

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : remove template #

Patch Set 4 : Replace vector with map. #

Patch Set 5 : Add out-of-line constructor. #

Total comments: 7

Patch Set 6 : Review comments. #

Total comments: 1

Patch Set 7 : imerge #

Patch Set 8 : windows fxo #

Patch Set 9 : Z #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : Fix Win #

Patch Set 13 : fix win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -282 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M base/environment.h View 1 2 3 4 5 2 chunks +42 lines, -0 lines 0 comments Download
M base/environment.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +118 lines, -8 lines 0 comments Download
M base/environment_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +84 lines, -5 lines 0 comments Download
M base/process/launch.h View 1 2 3 4 4 chunks +7 lines, -42 lines 0 comments Download
A base/process/launch.cc View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
M base/process/launch_posix.cc View 1 2 3 3 chunks +3 lines, -125 lines 0 comments Download
M base/process/process_util_unittest.cc View 1 2 3 4 chunks +11 lines, -54 lines 0 comments Download
M chrome/browser/importer/external_process_importer_client.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/platform_util_linux.cc View 1 2 3 1 chunk +4 lines, -7 lines 0 comments Download
M chrome/test/chromedriver/chrome_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/utility/importer/firefox_importer_unittest_utils_mac.cc View 1 2 3 2 chunks +2 lines, -7 lines 0 comments Download
M chromeos/process_proxy/process_proxy.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M content/browser/browser_child_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_launcher.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/plugin_process_host.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/ppapi_plugin_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/utility_process_host_impl.h View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/browser_child_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/utility_process_host.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
brettw
7 years, 4 months ago (2013-08-09 18:02:36 UTC) #1
viettrungluu
Note: I've only reviewed environment.{cc,h} so far. https://codereview.chromium.org/22750002/diff/24001/base/environment.cc File base/environment.cc (right): https://codereview.chromium.org/22750002/diff/24001/base/environment.cc#newcode7 base/environment.cc:7: #include <map> ...
7 years, 4 months ago (2013-08-09 19:27:11 UTC) #2
brettw
https://codereview.chromium.org/22750002/diff/24001/base/environment.cc File base/environment.cc (right): https://codereview.chromium.org/22750002/diff/24001/base/environment.cc#newcode217 base/environment.cc:217: scoped_ptr<char*[]> result(reinterpret_cast<char**>(buffer)); On 2013/08/09 19:27:11, viettrungluu wrote: > Hrm, ...
7 years, 4 months ago (2013-08-09 20:08:56 UTC) #3
viettrungluu
LGTM. You break it, you buy it. https://codereview.chromium.org/22750002/diff/30001/base/environment.h File base/environment.h (right): https://codereview.chromium.org/22750002/diff/30001/base/environment.h#newcode1 base/environment.h:1: // Copyright ...
7 years, 4 months ago (2013-08-13 17:49:40 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brettw@chromium.org/22750002/117001
7 years, 3 months ago (2013-08-29 20:19:52 UTC) #5
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=23086
7 years, 3 months ago (2013-08-29 20:34:19 UTC) #6
brettw
7 years, 3 months ago (2013-08-30 18:00:45 UTC) #7
Message was sent while issue was closed.
Committed patchset #13 manually as r220608.

Powered by Google App Engine
This is Rietveld 408576698