| Index: content/browser/appcache/appcache_url_request.cc
|
| diff --git a/content/browser/appcache/appcache_url_request.cc b/content/browser/appcache/appcache_url_request.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..714eab7185d2ef899283acbb9b8cc6735cd58a1a
|
| --- /dev/null
|
| +++ b/content/browser/appcache/appcache_url_request.cc
|
| @@ -0,0 +1,63 @@
|
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/browser/appcache/appcache_url_request.h"
|
| +#include "net/url_request/url_request.h"
|
| +
|
| +namespace content {
|
| +
|
| +// static
|
| +AppCacheURLRequest* AppCacheURLRequest::Create(net::URLRequest* url_request) {
|
| + return new AppCacheURLRequest(url_request);
|
| +}
|
| +
|
| +const GURL& AppCacheURLRequest::GetURL() const {
|
| + return url_request_->url();
|
| +}
|
| +
|
| +const std::string& AppCacheURLRequest::GetMethod() const {
|
| + return url_request_->method();
|
| +}
|
| +
|
| +const GURL& AppCacheURLRequest::GetFirstPartyForCookies() const {
|
| + return url_request_->first_party_for_cookies();
|
| +}
|
| +
|
| +const GURL AppCacheURLRequest::GetReferrer() const {
|
| + return GURL(url_request_->referrer());
|
| +}
|
| +
|
| +bool AppCacheURLRequest::IsSuccess() const {
|
| + return url_request_->status().is_success();
|
| +}
|
| +
|
| +bool AppCacheURLRequest::IsCancelled() const {
|
| + return url_request_->status().status() == net::URLRequestStatus::CANCELED;
|
| +}
|
| +
|
| +bool AppCacheURLRequest::IsError() const {
|
| + return !url_request_->status().is_success();
|
| +}
|
| +
|
| +int AppCacheURLRequest::GetResponseCode() const {
|
| + return url_request_->GetResponseCode();
|
| +}
|
| +
|
| +std::string AppCacheURLRequest::GetResponseHeaderByName(
|
| + const std::string& name) const {
|
| + std::string header;
|
| + url_request_->GetResponseHeaderByName(name, &header);
|
| + return header;
|
| +}
|
| +
|
| +net::URLRequest* AppCacheURLRequest::GetURLRequest() {
|
| + return url_request_;
|
| +}
|
| +
|
| +AppCacheURLRequest::AppCacheURLRequest(net::URLRequest* url_request)
|
| + : url_request_(url_request) {}
|
| +
|
| +AppCacheURLRequest::~AppCacheURLRequest() {}
|
| +
|
| +} // namespace content
|
|
|