Chromium Code Reviews| Index: content/browser/appcache/appcache_update_job.cc |
| diff --git a/content/browser/appcache/appcache_update_job.cc b/content/browser/appcache/appcache_update_job.cc |
| index e55f991e5f987d2be0d2f172513ca10772d5b200..cea56bfacc5ff017328dc257d81c0b3e199dcf5c 100644 |
| --- a/content/browser/appcache/appcache_update_job.cc |
| +++ b/content/browser/appcache/appcache_update_job.cc |
| @@ -21,6 +21,7 @@ |
| #include "net/base/request_priority.h" |
| #include "net/http/http_request_headers.h" |
| #include "net/http/http_response_headers.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "net/url_request/url_request_context.h" |
| #include "url/origin.h" |
| @@ -69,6 +70,28 @@ bool IsEvictableError(AppCacheUpdateJob::ResultType result, |
| void EmptyCompletionCallback(int result) {} |
| +constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = |
| + net::DefineNetworkTrafficAnnotation("appcache_update_job", R"( |
| + semantics { |
| + sender: "HTML5 AppCache System" |
| + description: |
| + "Web pages can include a link to a manifest file which lists " |
| + "resources to be cached for offline access. The AppCache system" |
| + "retrieves those resources in the background." |
| + trigger: |
| + "User visits a web page containing a <html manifest=manifestUrl> " |
| + "tag, or navigates to a document retrived from an existing appcache." |
| + data: "None" |
| + destination: WEBSITE |
| + } |
| + policy { |
| + cookies_allowed: true |
| + cookies_store: "Profile cookie store" |
| + setting: |
| + "Users can control this feature via the 'Cookies' setting under " |
| + "'Privacy, Content settings'. The feature is enabled by default." |
| + policy_exception_justification: "Not Implemented." |
|
michaeln
2017/04/21 20:17:47
The cookies settings affect the entire appcache fe
Ramin Halavati
2017/04/24 05:46:20
I am not sure if I correctly got it. You mean if c
michaeln
2017/04/24 20:38:10
Think of an appcache as a big cookie, if you disab
Ramin Halavati
2017/04/26 05:49:19
Thank you for clarification.
|
| + })"); |
| } // namespace |
| // Helper class for collecting hosts per frontend when sending notifications |
| @@ -158,8 +181,11 @@ AppCacheUpdateJob::URLFetcher::URLFetcher(const GURL& url, |
| fetch_type_(fetch_type), |
| retry_503_attempts_(0), |
| buffer_(new net::IOBuffer(kBufferSize)), |
| - request_(job->service_->request_context() |
| - ->CreateRequest(url, net::DEFAULT_PRIORITY, this)), |
| + request_( |
| + job->service_->request_context()->CreateRequest(url, |
| + net::DEFAULT_PRIORITY, |
| + this, |
| + kTrafficAnnotation)), |
| result_(UPDATE_OK), |
| redirect_response_code_(-1) {} |
| @@ -393,7 +419,7 @@ bool AppCacheUpdateJob::URLFetcher::MaybeRetryRequest() { |
| ++retry_503_attempts_; |
| result_ = UPDATE_OK; |
| request_ = job_->service_->request_context()->CreateRequest( |
| - url_, net::DEFAULT_PRIORITY, this); |
| + url_, net::DEFAULT_PRIORITY, this, kTrafficAnnotation); |
| Start(); |
| return true; |
| } |