Pass user agent along like http referrer and set user agent in C++
This commit is contained in:
parent
4a8d7c1819
commit
e4d90f747f
3 changed files with 14 additions and 6 deletions
|
@ -418,6 +418,10 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {
|
|||
params.referrer = content::Referrer(http_referrer.GetAsReferrer(),
|
||||
blink::WebReferrerPolicyDefault);
|
||||
|
||||
std::string user_agent;
|
||||
if (options.Get("useragent", &user_agent))
|
||||
this->SetUserAgent(user_agent);
|
||||
|
||||
params.transition_type = ui::PAGE_TRANSITION_TYPED;
|
||||
params.should_clear_history_list = true;
|
||||
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue