Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1311)

Unified Diff: content/common/service_worker/service_worker_types.h

Issue 1965013002: Implement headers attributes in ForeignFetchResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using instead of typedef Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/service_worker/service_worker_types.h
diff --git a/content/common/service_worker/service_worker_types.h b/content/common/service_worker/service_worker_types.h
index 81f7d4f7d508f1f5021e3cf0fd1cb35081ae1469..b6ea88dd52b38c5b71ee6e6f6397402fd2dbbc5b 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -121,8 +121,10 @@ struct ServiceWorkerCaseInsensitiveCompare {
}
};
-typedef std::map<std::string, std::string, ServiceWorkerCaseInsensitiveCompare>
- ServiceWorkerHeaderMap;
+using ServiceWorkerHeaderMap =
+ std::map<std::string, std::string, ServiceWorkerCaseInsensitiveCompare>;
+
+using ServiceWorkerHeaderList = std::vector<std::string>;
// To dispatch fetch request from browser to child process.
struct CONTENT_EXPORT ServiceWorkerFetchRequest {
@@ -155,18 +157,20 @@ struct CONTENT_EXPORT ServiceWorkerFetchRequest {
// Represents a response to a fetch.
struct CONTENT_EXPORT ServiceWorkerResponse {
ServiceWorkerResponse();
- ServiceWorkerResponse(const GURL& url,
- int status_code,
- const std::string& status_text,
- blink::WebServiceWorkerResponseType response_type,
- const ServiceWorkerHeaderMap& headers,
- const std::string& blob_uuid,
- uint64_t blob_size,
- const GURL& stream_url,
- blink::WebServiceWorkerResponseError error,
- base::Time response_time,
- bool is_in_cache_storage,
- const std::string& cache_storage_cache_name);
+ ServiceWorkerResponse(
+ const GURL& url,
+ int status_code,
+ const std::string& status_text,
+ blink::WebServiceWorkerResponseType response_type,
+ const ServiceWorkerHeaderMap& headers,
+ const std::string& blob_uuid,
+ uint64_t blob_size,
+ const GURL& stream_url,
+ blink::WebServiceWorkerResponseError error,
+ base::Time response_time,
+ bool is_in_cache_storage,
+ const std::string& cache_storage_cache_name,
+ const ServiceWorkerHeaderList& cors_exposed_header_names);
ServiceWorkerResponse(const ServiceWorkerResponse& other);
~ServiceWorkerResponse();
@@ -182,6 +186,7 @@ struct CONTENT_EXPORT ServiceWorkerResponse {
base::Time response_time;
bool is_in_cache_storage = false;
std::string cache_storage_cache_name;
+ ServiceWorkerHeaderList cors_exposed_header_names;
};
// Represents initialization info for a WebServiceWorker object.
« no previous file with comments | « content/common/service_worker/service_worker_messages.h ('k') | content/common/service_worker/service_worker_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698