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

Unified Diff: content/common/navigation_params.cc

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: Fix rebase compilation issues Created 3 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 613918e74abc842648c5d7f7ed4e03c7780c6995..33ce95e61b3285dbfa59200602e5134b9f1ac839 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -26,6 +26,15 @@ bool ShouldMakeNetworkRequestForURL(const GURL& url) {
url != content::kAboutSrcDocURL;
}
+SourceLocation::SourceLocation() : line_number(0), column_number(0) {}
+
+SourceLocation::SourceLocation(const std::string& url,
+ unsigned int line_number,
+ unsigned int column_number)
+ : url(url), line_number(line_number), column_number(column_number) {}
+
+SourceLocation::~SourceLocation() {}
+
CommonNavigationParams::CommonNavigationParams()
: transition(ui::PAGE_TRANSITION_LINK),
navigation_type(FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT),
@@ -50,7 +59,8 @@ CommonNavigationParams::CommonNavigationParams(
PreviewsState previews_state,
const base::TimeTicks& navigation_start,
std::string method,
- const scoped_refptr<ResourceRequestBodyImpl>& post_data)
+ const scoped_refptr<ResourceRequestBodyImpl>& post_data,
+ base::Optional<SourceLocation> source_location)
: url(url),
referrer(referrer),
transition(transition),
@@ -64,7 +74,8 @@ CommonNavigationParams::CommonNavigationParams(
previews_state(previews_state),
navigation_start(navigation_start),
method(method),
- post_data(post_data) {
+ post_data(post_data),
+ source_location(source_location) {
// |method != "POST"| should imply absence of |post_data|.
if (method != "POST" && post_data) {
NOTREACHED();
« 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