mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix CefCommandLine character case requirements (fixes issue #1872)
Switch names will now be converted to lowercase ASCII on all platforms. Switch values will retain the original case and UTF8 encoding.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
||||
CefCommandLineImpl::CefCommandLineImpl(base::CommandLine* value,
|
||||
bool will_delete,
|
||||
@@ -90,12 +91,13 @@ bool CefCommandLineImpl::HasSwitches() {
|
||||
|
||||
bool CefCommandLineImpl::HasSwitch(const CefString& name) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
return const_value().HasSwitch(name.ToString());
|
||||
return const_value().HasSwitch(base::ToLowerASCII(name.ToString()));
|
||||
}
|
||||
|
||||
CefString CefCommandLineImpl::GetSwitchValue(const CefString& name) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetSwitchValueNative(name.ToString());
|
||||
return const_value().GetSwitchValueNative(
|
||||
base::ToLowerASCII(name.ToString()));
|
||||
}
|
||||
|
||||
void CefCommandLineImpl::GetSwitches(SwitchMap& switches) {
|
||||
|
Reference in New Issue
Block a user