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

Unified Diff: Source/core/inspector/InspectorApplicationCacheAgent.cpp

Issue 898593002: DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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: Source/core/inspector/InspectorApplicationCacheAgent.cpp
diff --git a/Source/core/inspector/InspectorApplicationCacheAgent.cpp b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
index 271f1cf746f5575dd05c8758aa29d93fee789b0b..0baa45b349338c01f539b014b18197267331135c 100644
--- a/Source/core/inspector/InspectorApplicationCacheAgent.cpp
+++ b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
@@ -71,9 +71,7 @@ void InspectorApplicationCacheAgent::enable(ErrorString*)
{
m_state->setBoolean(ApplicationCacheAgentState::applicationCacheAgentEnabled, true);
m_instrumentingAgents->setInspectorApplicationCacheAgent(this);
-
- // We need to pass initial navigator.onOnline.
- networkStateChanged(networkStateNotifier().onLine());
+ m_frontend->networkStateUpdated(networkStateNotifier().onLine());
}
void InspectorApplicationCacheAgent::updateApplicationCacheStatus(LocalFrame* frame)
@@ -90,9 +88,10 @@ void InspectorApplicationCacheAgent::updateApplicationCacheStatus(LocalFrame* fr
m_frontend->applicationCacheStatusUpdated(m_pageAgent->frameId(frame), manifestURL, static_cast<int>(status));
}
-void InspectorApplicationCacheAgent::networkStateChanged(bool online)
+void InspectorApplicationCacheAgent::networkStateChanged(LocalFrame* frame, bool online)
{
- m_frontend->networkStateUpdated(online);
+ if (frame == m_pageAgent->mainFrame())
+ m_frontend->networkStateUpdated(online);
}
void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest> >& result)

Powered by Google App Engine
This is Rietveld 408576698