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

Unified Diff: content/common/navigation_params.cc

Issue 1018383002: Make NavigationParams clearer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed comment Created 5 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/common/navigation_params.h ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/navigation_params.cc
diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc
index 18628b4ac8697d5a6ffaccbca33f4eea8db309bc..0e8df3c97cee673054e3bf6b100505270cdf2aaf 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -40,8 +40,7 @@ CommonNavigationParams::~CommonNavigationParams() {
}
BeginNavigationParams::BeginNavigationParams()
- : load_flags(0),
- has_user_gesture(false) {
+ : load_flags(0), has_user_gesture(false) {
}
BeginNavigationParams::BeginNavigationParams(std::string method,
@@ -54,46 +53,63 @@ BeginNavigationParams::BeginNavigationParams(std::string method,
has_user_gesture(has_user_gesture) {
}
-CommitNavigationParams::CommitNavigationParams()
- : is_overriding_user_agent(false),
- browser_navigation_start(base::TimeTicks::Now()),
- can_load_local_resources(false),
- request_time(base::Time::Now()) {
+StartNavigationParams::StartNavigationParams()
+ : is_post(false),
+ should_replace_current_entry(false),
+ transferred_request_child_id(-1),
+ transferred_request_request_id(-1) {
}
-CommitNavigationParams::CommitNavigationParams(
- bool is_overriding_user_agent,
- base::TimeTicks navigation_start,
- const std::vector<GURL>& redirects,
- bool can_load_local_resources,
- const std::string& frame_to_navigate,
- base::Time request_time)
- : is_overriding_user_agent(is_overriding_user_agent),
- browser_navigation_start(navigation_start),
- redirects(redirects),
- can_load_local_resources(can_load_local_resources),
- frame_to_navigate(frame_to_navigate),
- request_time(request_time) {
+StartNavigationParams::StartNavigationParams(
+ bool is_post,
+ const std::string& extra_headers,
+ const std::vector<unsigned char>& browser_initiated_post_data,
+ bool should_replace_current_entry,
+ int transferred_request_child_id,
+ int transferred_request_request_id)
+ : is_post(is_post),
+ extra_headers(extra_headers),
+ browser_initiated_post_data(browser_initiated_post_data),
+ should_replace_current_entry(should_replace_current_entry),
+ transferred_request_child_id(transferred_request_child_id),
+ transferred_request_request_id(transferred_request_request_id) {
}
-CommitNavigationParams::~CommitNavigationParams() {}
+StartNavigationParams::~StartNavigationParams() {
+}
-HistoryNavigationParams::HistoryNavigationParams()
- : page_id(-1),
+RequestNavigationParams::RequestNavigationParams()
+ : is_overriding_user_agent(false),
+ browser_navigation_start(base::TimeTicks::Now()),
+ can_load_local_resources(false),
+ request_time(base::Time::Now()),
+ page_id(-1),
pending_history_list_offset(-1),
current_history_list_offset(-1),
current_history_list_length(0),
should_clear_history_list(false) {
}
-HistoryNavigationParams::HistoryNavigationParams(
+RequestNavigationParams::RequestNavigationParams(
+ bool is_overriding_user_agent,
+ base::TimeTicks navigation_start,
+ const std::vector<GURL>& redirects,
+ bool can_load_local_resources,
+ const std::string& frame_to_navigate,
+ base::Time request_time,
const PageState& page_state,
int32 page_id,
int pending_history_list_offset,
int current_history_list_offset,
int current_history_list_length,
bool should_clear_history_list)
- : page_state(page_state),
+ : is_overriding_user_agent(is_overriding_user_agent),
+ browser_navigation_start(navigation_start),
+ redirects(redirects),
+ can_load_local_resources(can_load_local_resources),
+ frame_to_navigate(frame_to_navigate),
+ request_time(request_time),
+ page_state(page_state),
page_id(page_id),
pending_history_list_offset(pending_history_list_offset),
current_history_list_offset(current_history_list_offset),
@@ -101,43 +117,16 @@ HistoryNavigationParams::HistoryNavigationParams(
should_clear_history_list(should_clear_history_list) {
}
-HistoryNavigationParams::~HistoryNavigationParams() {
-}
-
-StartNavigationParams::StartNavigationParams()
- : is_post(false),
- should_replace_current_entry(false),
- transferred_request_child_id(-1),
- transferred_request_request_id(-1) {
-}
-
-StartNavigationParams::StartNavigationParams(
- bool is_post,
- const std::string& extra_headers,
- const std::vector<unsigned char>& browser_initiated_post_data,
- bool should_replace_current_entry,
- int transferred_request_child_id,
- int transferred_request_request_id)
- : is_post(is_post),
- extra_headers(extra_headers),
- browser_initiated_post_data(browser_initiated_post_data),
- should_replace_current_entry(should_replace_current_entry),
- transferred_request_child_id(transferred_request_child_id),
- transferred_request_request_id(transferred_request_request_id) {
-}
-
-StartNavigationParams::~StartNavigationParams() {
+RequestNavigationParams::~RequestNavigationParams() {
}
NavigationParams::NavigationParams(
const CommonNavigationParams& common_params,
const StartNavigationParams& start_params,
- const CommitNavigationParams& commit_params,
- const HistoryNavigationParams& history_params)
+ const RequestNavigationParams& request_params)
: common_params(common_params),
start_params(start_params),
- commit_params(commit_params),
- history_params(history_params) {
+ request_params(request_params) {
}
NavigationParams::~NavigationParams() {
« no previous file with comments | « content/common/navigation_params.h ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698