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

Unified Diff: content/common/frame_message_enums.h

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_message_enums.h
diff --git a/content/common/frame_message_enums.h b/content/common/frame_message_enums.h
index 3d9f84a510f2fcdb3c775c06d1fed12c1f428cdd..ef1d22d0b18e8892038f20795c353cfeb2cd8ba7 100644
--- a/content/common/frame_message_enums.h
+++ b/content/common/frame_message_enums.h
@@ -29,12 +29,36 @@ struct FrameMsg_Navigate_Type {
// Like RESTORE, except that the navigation contains POST data.
RESTORE_WITH_POST,
- // Navigation type not categorized by the other types.
- NORMAL,
+ // History navigation inside the same document.
+ HISTORY_SAME_DOCUMENT,
+
+ // History navigation to a different document.
+ HISTORY_DIFFERENT_DOCUMENT,
+
+ // Navigation inside the same document. It occurs when the part of the url
+ // that is modified is after the '#' part.
+ SAME_DOCUMENT,
+
+ // Navigation to another document.
+ DIFFERENT_DOCUMENT,
// Last guard value, so we can use it for validity checks.
- NAVIGATE_TYPE_LAST = NORMAL,
+ NAVIGATE_TYPE_LAST = DIFFERENT_DOCUMENT,
};
+
+ static bool IsReload(Value value) {
+ return value == RELOAD || value == RELOAD_BYPASSING_CACHE ||
+ value == RELOAD_ORIGINAL_REQUEST_URL;
+ }
+
+ static bool IsSameDocument(Value value) {
+ return value == SAME_DOCUMENT || value == HISTORY_SAME_DOCUMENT;
+ }
+
+ static bool IsHistory(Value value) {
+ return value == HISTORY_SAME_DOCUMENT ||
+ value == HISTORY_DIFFERENT_DOCUMENT;
+ }
};
struct FrameMsg_UILoadMetricsReportType {
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698