Commit 89fa311e authored by Shelley Vohr's avatar Shelley Vohr Committed by Commit Bot

Fix libc++ const container element incompatibility

Using const container elements like
const std::vector<const std::string> a = {"a"};
will fail when building with libc++ on: 'The C++ Standard
forbids containers of const elements because
allocator<const T> is ill-formed." Electron encountered this issue
as we build Chromedriver with libc++.

This fixes the issue by changing the elements to non-const std::strings.

Bug: 994347

Change-Id: I309a521fa360e3b36beca53354edadc668a9a12f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756424Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Reviewed-by: default avatarNina Satragno <nsatragno@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687662}
parent a6114202
......@@ -837,6 +837,7 @@ Shanmuga Pandi M <shanmuga.m@samsung.com>
Shaobo Yan <shaobo.yan@intel.com>
Shashi Kumar <sk.kumar@samsung.com>
Shawn Anastasio <shawnanastasio@gmail.com>
Shelley Vohr <shelley.vohr@gmail.com>
Shen Yu <shenyu.tcv@gmail.com>
Sherry Mou <wenjinm@amazon.com>
Shez Baig <sbaig1@bloomberg.net>
......
......@@ -36,7 +36,7 @@ base::DictionaryValue MapParams(
// Converts the string |keys| in |params| from base64url to base64. Returns a
// status error if conversion of one of the keys failed.
Status ConvertBase64UrlToBase64(base::Value* params,
const std::vector<const std::string> keys) {
const std::vector<std::string> keys) {
for (const std::string key : keys) {
base::Value* maybe_value = params->FindKey(key);
if (!maybe_value)
......@@ -60,7 +60,7 @@ Status ConvertBase64UrlToBase64(base::Value* params,
// Converts the string |keys| in |params| from base64 to base64url.
void ConvertBase64ToBase64Url(base::Value* params,
const std::vector<const std::string> keys) {
const std::vector<std::string> keys) {
for (const std::string key : keys) {
std::string* maybe_value = params->FindStringKey(key);
if (!maybe_value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment