diff options
author | Alex Light <allight@google.com> | 2018-01-26 14:24:54 -0800 |
---|---|---|
committer | Alex Light <allight@google.com> | 2018-01-26 22:29:00 +0000 |
commit | 2183d4d5a65e77234a9d54d32bc0b6918a50c493 (patch) | |
tree | a4b6642d04824391c3965f7f5f46e9afc4595283 /cmdline | |
parent | bf9eedaac5a9723f022150d0f5fd58cb91779497 (diff) | |
download | android_art-2183d4d5a65e77234a9d54d32bc0b6918a50c493.tar.gz android_art-2183d4d5a65e77234a9d54d32bc0b6918a50c493.tar.bz2 android_art-2183d4d5a65e77234a9d54d32bc0b6918a50c493.zip |
Refactor jdwp_provider to make it easier to change the default
Change JdwpProvider to have a kDefaultJdwpProvider member that can be
updated to be whatever the current default jdwp provider is.
Test: build
Test: cmdline_parser_test
Change-Id: I89559cc63d371be60b594d850f1a16a557b42edc
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/cmdline_parser_test.cc | 2 | ||||
-rw-r--r-- | cmdline/cmdline_types.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc index 5d672061df..1e79fdff1b 100644 --- a/cmdline/cmdline_parser_test.cc +++ b/cmdline/cmdline_parser_test.cc @@ -375,7 +375,7 @@ TEST_F(CmdlineParserTest, TestJdwpProviderEmpty) { TEST_F(CmdlineParserTest, TestJdwpProviderDefault) { const char* opt_args = "-XjdwpProvider:default"; - EXPECT_SINGLE_PARSE_VALUE(JdwpProvider::kInternal, opt_args, M::JdwpProvider); + EXPECT_SINGLE_PARSE_VALUE(JdwpProvider::kDefaultJdwpProvider, opt_args, M::JdwpProvider); } // TEST_F TEST_F(CmdlineParserTest, TestJdwpProviderInternal) { diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h index d0d6bfd3ce..c8be69d922 100644 --- a/cmdline/cmdline_types.h +++ b/cmdline/cmdline_types.h @@ -76,9 +76,10 @@ struct CmdlineType<JdwpProvider> : CmdlineTypeParser<JdwpProvider> { "Example: -XjdwpProvider:none to disable JDWP\n" "Example: -XjdwpProvider:internal for internal jdwp implementation\n" "Example: -XjdwpProvider:adbconnection for adb connection mediated jdwp implementation\n" - "Example: -XjdwpProvider:default for the default jdwp implementation" - " (currently internal)\n"); - } else if (option == "internal" || option == "default") { + "Example: -XjdwpProvider:default for the default jdwp implementation\n"); + } else if (option == "default") { + return Result::Success(JdwpProvider::kDefaultJdwpProvider); + } else if (option == "internal") { return Result::Success(JdwpProvider::kInternal); } else if (option == "adbconnection") { return Result::Success(JdwpProvider::kAdbConnection); |