summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_multiprocess_test.cc
diff options
context:
space:
mode:
authordtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-15 00:55:42 +0000
committerdtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-15 00:55:42 +0000
commitfbcf7ab20679679f9c4f589a34df250a01f12cdf (patch)
treec329deb4d293c8b69d63e29f6a37fda48ca842c9 /ipc/ipc_multiprocess_test.cc
parent433f7d8c6904ea68aa8774b2305b865e4cac4048 (diff)
downloadchromium_src-fbcf7ab20679679f9c4f589a34df250a01f12cdf.zip
chromium_src-fbcf7ab20679679f9c4f589a34df250a01f12cdf.tar.gz
chromium_src-fbcf7ab20679679f9c4f589a34df250a01f12cdf.tar.bz2
[telemetry] Add command_line.ArgumentHandlerMixIn class.
The beginnings of a new way to handle command-line options. In the future, all classes that add command-line options must implement ArgumentHandlerMixIn. Usage: Subclass ArgumentHandlerMixIn. In AddCommandLineArgs, set the command-line options. In ProcessCommandLineArgs, store them in private static class variables. The class can retrieve its own arguments at any time - yes, it's global state, but command-line arguments are always global state anyway, and it's contained within that class. - Keeps declaration and usage of options close to each other, by encapsulating them in the same class. - Enforces that all arguments must be available at parse time without depending on other arguments, by making all methods @classmethods. - The ProcessCommandLineArgs() method gives Handlers a place to validate their command-line options before performing more expensive setup work. - Removes the need to pass the options parameter around everywhere. - Allows us to gradually break down Finder/BrowserOptions. Smooths the transition to argparse. BUG=163294, 350833 TEST=Unit tests, ran cloud_storage, run_benchmark, run_measurement, and run_gpu_tests with a bunch of different argument types. Review URL: https://codereview.chromium.org/187413003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257276 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_multiprocess_test.cc')
0 files changed, 0 insertions, 0 deletions