From 488801e2447481aea9affda152a5965244bf1aca Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 9 Jun 2015 09:27:57 +0800 Subject: [PATCH] Rename httpreferrer to httpReferrer, useragent to userAgent. --- atom/browser/api/atom_api_web_contents.cc | 4 ++-- docs/api/browser-window.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 3d925b83..848b243f 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -430,12 +430,12 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { content::NavigationController::LoadURLParams params(url); GURL http_referrer; - if (options.Get("httpreferrer", &http_referrer)) + if (options.Get("httpReferrer", &http_referrer)) params.referrer = content::Referrer(http_referrer.GetAsReferrer(), blink::WebReferrerPolicyDefault); std::string user_agent; - if (options.Get("useragent", &user_agent)) + if (options.Get("userAgent", &user_agent)) SetUserAgent(user_agent); params.transition_type = ui::PAGE_TRANSITION_TYPED; diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 768200dc..e60a7d22 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -782,8 +782,8 @@ Emitted when the WebContents is destroyed. * `url` URL * `options` URL - * `httpreferrer` String - A HTTP Referer url - * `useragent` String - A user agent originating the request + * `httpReferrer` String - A HTTP Referer url + * `userAgent` String - A user agent originating the request Loads the `url` in the window, the `url` must contains the protocol prefix, e.g. the `http://` or `file://`. -- 2.43.0