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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp

Issue 1872673002: DevTools: introduce the bypass service worker checkbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
index 8e8380cf863e19fe450bee658f546673c3d6b06e..9de10f468e5805a883dbb9ba06c5e1aa8be9a88c 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
@@ -85,6 +85,7 @@ namespace ResourceAgentState {
static const char resourceAgentEnabled[] = "resourceAgentEnabled";
static const char extraRequestHeaders[] = "extraRequestHeaders";
static const char cacheDisabled[] = "cacheDisabled";
+static const char bypassServiceWorker[] = "bypassServiceWorker";
static const char userAgentOverride[] = "userAgentOverride";
static const char monitoringXHR[] = "monitoringXHR";
static const char blockedURLs[] = "blockedURLs";
@@ -524,6 +525,8 @@ void InspectorResourceAgent::willSendRequest(LocalFrame* frame, unsigned long id
request.setCachePolicy(WebCachePolicy::BypassingCache);
request.setShouldResetAppCache(true);
}
+ if (m_state->booleanProperty(ResourceAgentState::bypassServiceWorker, false))
+ request.setSkipServiceWorker(true);
willSendRequestInternal(frame, identifier, loader, request, redirectResponse, initiatorInfo);
@@ -1057,6 +1060,11 @@ void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled)
memoryCache()->evictResources();
}
+void InspectorResourceAgent::setBypassServiceWorker(ErrorString*, bool bypass)
+{
+ m_state->setBoolean(ResourceAgentState::bypassServiceWorker, bypass);
+}
+
void InspectorResourceAgent::emulateNetworkConditions(ErrorString*, bool, double, double, double)
{
}

Powered by Google App Engine
This is Rietveld 408576698