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

Unified Diff: content/child/request_extra_data.cc

Issue 203853003: Merge weburlrequest_extradata_impl.cc/h into content/child/request_extra_data.cc/h (attempt #2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: heap allocate in render_frame_impl.cc Created 6 years, 9 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/child/request_extra_data.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/request_extra_data.cc
diff --git a/content/child/request_extra_data.cc b/content/child/request_extra_data.cc
index ba9789d6f49583beed257904b7a43006f662963c..88212ee6fec15cff351b48d73b3fa9a30ef80e69 100644
--- a/content/child/request_extra_data.cc
+++ b/content/child/request_extra_data.cc
@@ -4,39 +4,91 @@
#include "content/child/request_extra_data.h"
+#include "content/common/service_worker/service_worker_types.h"
+#include "ipc/ipc_message.h"
+
using blink::WebString;
namespace content {
-RequestExtraData::RequestExtraData(
- blink::WebPageVisibilityState visibility_state,
- const WebString& custom_user_agent,
- bool was_after_preconnect_request,
- int render_frame_id,
- bool is_main_frame,
- const GURL& frame_origin,
- bool parent_is_main_frame,
- int parent_render_frame_id,
- bool allow_download,
- PageTransition transition_type,
- bool should_replace_current_entry,
- int transferred_request_child_id,
- int transferred_request_request_id,
- int service_worker_provider_id)
- : webkit_glue::WebURLRequestExtraDataImpl(custom_user_agent,
- was_after_preconnect_request),
- visibility_state_(visibility_state),
- render_frame_id_(render_frame_id),
- is_main_frame_(is_main_frame),
- frame_origin_(frame_origin),
- parent_is_main_frame_(parent_is_main_frame),
- parent_render_frame_id_(parent_render_frame_id),
- allow_download_(allow_download),
- transition_type_(transition_type),
- should_replace_current_entry_(should_replace_current_entry),
- transferred_request_child_id_(transferred_request_child_id),
- transferred_request_request_id_(transferred_request_request_id),
- service_worker_provider_id_(service_worker_provider_id) {
+RequestExtraData::RequestExtraData() {
+ set_visibility_state(blink::WebPageVisibilityStateVisible);
jam 2014/03/20 17:16:43 use initialization list here, i.e. RequestExtraDat
+ set_custom_user_agent(blink::WebString());
+ set_was_after_preconnect_request(false);
+ set_render_frame_id(MSG_ROUTING_NONE);
+ set_is_main_frame(true);
+ set_frame_origin(GURL());
+ set_parent_is_main_frame(false);
+ set_parent_render_frame_id(-1);
+ set_allow_download(true);
+ set_transition_type(PAGE_TRANSITION_LINK);
+ set_should_replace_current_entry(false);
+ set_transferred_request_child_id(-1);
+ set_transferred_request_request_id(-1);
+ set_service_worker_provider_id(kInvalidServiceWorkerProviderId);
+}
+
+void RequestExtraData::set_visibility_state(
jam 2014/03/20 17:16:43 since these are simple setters, by convention we i
+ blink::WebPageVisibilityState visibility_state) {
+ visibility_state_ = visibility_state;
+}
+
+void RequestExtraData::set_render_frame_id(int render_frame_id) {
+ render_frame_id_ = render_frame_id;
+}
+
+void RequestExtraData::set_is_main_frame(bool is_main_frame) {
+ is_main_frame_ = is_main_frame;
+}
+
+void RequestExtraData::set_frame_origin(const GURL& frame_origin) {
+ frame_origin_ = frame_origin;
+}
+
+void RequestExtraData::set_parent_is_main_frame(bool parent_is_main_frame) {
+ parent_is_main_frame_ = parent_is_main_frame;
+}
+
+void RequestExtraData::set_parent_render_frame_id(int parent_render_frame_id) {
+ parent_render_frame_id_ = parent_render_frame_id;
+}
+
+void RequestExtraData::set_allow_download(bool allow_download) {
+ allow_download_ = allow_download;
+}
+
+void RequestExtraData::set_transition_type(PageTransition transition_type) {
+ transition_type_ = transition_type;
+}
+
+void RequestExtraData::set_should_replace_current_entry(
+ bool should_replace_current_entry) {
+ should_replace_current_entry_ = should_replace_current_entry;
+}
+
+void RequestExtraData::set_transferred_request_child_id(
+ int transferred_request_child_id) {
+ transferred_request_child_id_ = transferred_request_child_id;
+}
+
+void RequestExtraData::set_transferred_request_request_id(
+ int transferred_request_request_id) {
+ transferred_request_request_id_ = transferred_request_request_id;
+}
+
+void RequestExtraData::set_service_worker_provider_id(
+ int service_worker_provider_id) {
+ service_worker_provider_id_ = service_worker_provider_id;
+}
+
+void RequestExtraData::set_custom_user_agent(
+ const blink::WebString& custom_user_agent) {
+ custom_user_agent_ = custom_user_agent;
+}
+
+void RequestExtraData::set_was_after_preconnect_request(
+ bool was_after_preconnect_request) {
+ was_after_preconnect_request_ = was_after_preconnect_request;
}
RequestExtraData::~RequestExtraData() {
« no previous file with comments | « content/child/request_extra_data.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698