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

Unified Diff: content/public/common/resource_response.cc

Issue 519533002: Initial PlzNavigate RDH-side logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 years, 2 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
« no previous file with comments | « content/public/common/resource_response.h ('k') | content/public/common/resource_response_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/resource_response.cc
diff --git a/content/public/common/resource_response.cc b/content/public/common/resource_response.cc
new file mode 100644
index 0000000000000000000000000000000000000000..41e7be6f65b43ce712e6547bc9684935dcdff473
--- /dev/null
+++ b/content/public/common/resource_response.cc
@@ -0,0 +1,51 @@
+// Copyright 2014 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/public/common/resource_response.h"
+
+#include "net/http/http_response_headers.h"
+
+namespace content {
+
+scoped_refptr<ResourceResponse> ResourceResponse::DeepCopy() const {
+ scoped_refptr<ResourceResponse> new_response(new ResourceResponse);
+ new_response->head.request_time = head.request_time;
+ new_response->head.response_time = head.response_time;
+ if (head.headers.get()) {
+ new_response->head.headers =
+ new net::HttpResponseHeaders(head.headers->raw_headers());
+ }
+ new_response->head.mime_type = head.mime_type;
+ new_response->head.charset = head.charset;
+ new_response->head.security_info = head.security_info;
+ new_response->head.content_length = head.content_length;
+ new_response->head.encoded_data_length = head.encoded_data_length;
+ new_response->head.appcache_id = head.appcache_id;
+ new_response->head.appcache_manifest_url = head.appcache_manifest_url;
+ new_response->head.load_timing = head.load_timing;
+ if (head.devtools_info.get()) {
+ new_response->head.devtools_info = head.devtools_info->DeepCopy();
+ }
+ new_response->head.download_file_path = head.download_file_path;
+ new_response->head.was_fetched_via_spdy = head.was_fetched_via_spdy;
+ new_response->head.was_npn_negotiated = head.was_npn_negotiated;
+ new_response->head.was_alternate_protocol_available =
+ new_response->head.was_alternate_protocol_available;
+ new_response->head.connection_info = head.connection_info;
+ new_response->head.was_fetched_via_proxy = head.was_fetched_via_proxy;
+ new_response->head.npn_negotiated_protocol = head.npn_negotiated_protocol;
+ new_response->head.socket_address = head.socket_address;
+ new_response->head.was_fetched_via_service_worker =
+ head.was_fetched_via_service_worker;
+ new_response->head.original_url_via_service_worker =
+ head.original_url_via_service_worker;
+ new_response->head.service_worker_fetch_start =
+ head.service_worker_fetch_start;
+ new_response->head.service_worker_fetch_ready =
+ head.service_worker_fetch_ready;
+ new_response->head.service_worker_fetch_end = head.service_worker_fetch_end;
+ return new_response;
+}
+
+} // namespace content
« no previous file with comments | « content/public/common/resource_response.h ('k') | content/public/common/resource_response_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698