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

Unified Diff: content/common/navigation_params.cc

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style, placeholders, all that stuff Created 5 years, 4 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
Index: content/common/navigation_params.cc
diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc
index 5c5dfc778fe5c9be0097c21c204f815da8960176..b9c98e26ae5c75540f761ea757c2077cdf09bc03 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/memory/ref_counted_memory.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "content/public/common/content_switches.h"
namespace content {
@@ -28,7 +29,8 @@ CommonNavigationParams::CommonNavigationParams()
navigation_type(FrameMsg_Navigate_Type::NORMAL),
allow_download(true),
should_replace_current_entry(false),
- report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT) {
+ report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT),
+ service_worker_provider_id(kInvalidServiceWorkerProviderId) {
}
CommonNavigationParams::CommonNavigationParams(
@@ -41,7 +43,8 @@ CommonNavigationParams::CommonNavigationParams(
base::TimeTicks ui_timestamp,
FrameMsg_UILoadMetricsReportType::Value report_type,
const GURL& base_url_for_data_url,
- const GURL& history_url_for_data_url)
+ const GURL& history_url_for_data_url,
+ int service_worker_provider_id)
: url(url),
referrer(referrer),
transition(transition),
@@ -51,24 +54,45 @@ CommonNavigationParams::CommonNavigationParams(
ui_timestamp(ui_timestamp),
report_type(report_type),
base_url_for_data_url(base_url_for_data_url),
- history_url_for_data_url(history_url_for_data_url) {
+ history_url_for_data_url(history_url_for_data_url),
+ service_worker_provider_id(service_worker_provider_id) {
}
CommonNavigationParams::~CommonNavigationParams() {
}
BeginNavigationParams::BeginNavigationParams()
- : load_flags(0), has_user_gesture(false) {
+ : load_flags(0),
+ has_user_gesture(false),
+ skip_service_worker(false),
+ fetch_request_mode(FETCH_REQUEST_MODE_NO_CORS),
+ fetch_credentials_mode(FETCH_CREDENTIALS_MODE_SAME_ORIGIN),
+ fetch_redirect_mode(FetchRedirectMode::FOLLOW_MODE),
+ request_context_type(REQUEST_CONTEXT_TYPE_LOCATION),
+ frame_type(REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL) {
}
-BeginNavigationParams::BeginNavigationParams(std::string method,
- std::string headers,
- int load_flags,
- bool has_user_gesture)
+BeginNavigationParams::BeginNavigationParams(
+ std::string method,
+ std::string headers,
+ int load_flags,
+ bool has_user_gesture,
+ bool skip_service_worker,
+ FetchRequestMode fetch_request_mode,
+ FetchCredentialsMode fetch_credentials_mode,
+ FetchRedirectMode fetch_redirect_mode,
+ RequestContextType request_context_type,
+ RequestContextFrameType frame_type)
: method(method),
headers(headers),
load_flags(load_flags),
- has_user_gesture(has_user_gesture) {
+ has_user_gesture(has_user_gesture),
+ skip_service_worker(skip_service_worker),
+ fetch_request_mode(fetch_request_mode),
+ fetch_credentials_mode(fetch_credentials_mode),
+ fetch_redirect_mode(fetch_redirect_mode),
+ request_context_type(request_context_type),
+ frame_type(frame_type) {
}
StartNavigationParams::StartNavigationParams()

Powered by Google App Engine
This is Rietveld 408576698