Hello everyone,
continuing to study the chromium code, I became interested in the ability to pass arguments from the command line to the browser
In my example, I would like to replace the address value in WebRTС candidate
in file
third_party > blink > renderer > modules > peerconnection > rtc_ice_candidate.cc
i found the function
String RTCIceCandidate::candidate() const { platform_candidate_->Candidate(); }
and tried to replace it with the value I needed
String RTCIceCandidate::candidate() const {
String _rqs = platform_candidate_->Address();
String _FakeAddress = "0.0.0.0";
if(base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kFakeWebRTC)){
_FakeAddress = base::CommandLine::GetSwitchValueASCII('fake-webrtc')
}
String copyq = platform_candidate_->Candidate();
return copyq.Replace(_rqs,_FakeAddress);
}
I am also correct to create a new switch. Because in other files, the key is defined correctly.
But as a result I get my ip as 0.0.0.0
I think I am making a mistake when dealing with the base::CommandLine.
I did not find the information I needed, thanks.