mirror of
https://github.com/electron/electron.git
synced 2026-01-24 23:08:10 -05:00
Remove URLRequestJobFactory::IsHandledURL.
https://codereview.chromium.org/2783343002
This commit is contained in:
@@ -117,17 +117,13 @@ bool AtomURLRequestJobFactory::IsHandledProtocol(
|
||||
net::URLRequest::IsHandledProtocol(scheme);
|
||||
}
|
||||
|
||||
bool AtomURLRequestJobFactory::IsHandledURL(const GURL& url) const {
|
||||
if (!url.is_valid()) {
|
||||
bool AtomURLRequestJobFactory::IsSafeRedirectTarget(
|
||||
const GURL& location) const {
|
||||
if (!location.is_valid()) {
|
||||
// We handle error cases.
|
||||
return true;
|
||||
}
|
||||
return IsHandledProtocol(url.scheme());
|
||||
}
|
||||
|
||||
bool AtomURLRequestJobFactory::IsSafeRedirectTarget(
|
||||
const GURL& location) const {
|
||||
return IsHandledURL(location);
|
||||
return IsHandledProtocol(location.scheme());
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
||||
@@ -55,7 +55,6 @@ class AtomURLRequestJobFactory : public net::URLRequestJobFactory {
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate) const override;
|
||||
bool IsHandledProtocol(const std::string& scheme) const override;
|
||||
bool IsHandledURL(const GURL& url) const override;
|
||||
bool IsSafeRedirectTarget(const GURL& location) const override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user