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

Unified Diff: third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp

Issue 2704083002: Remove Page dependency from NetworkStateNotifier (Closed)
Patch Set: nullcheck for tests 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 | « third_party/WebKit/Source/core/page/Page.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
diff --git a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
index 7ff297e91e19349b2f612456d16823f35576fac3..c8063f436dce9d3b71817b1d704ba1b0188da665 100644
--- a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
+++ b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
@@ -130,18 +130,18 @@ void NetworkInformation::contextDestroyed(ExecutionContext*) {
void NetworkInformation::startObserving() {
if (!m_observing && !m_contextStopped) {
m_type = networkStateNotifier().connectionType();
- networkStateNotifier().addObserver(
- this, TaskRunnerHelper::get(TaskType::Networking, getExecutionContext())
- .get());
+ networkStateNotifier().addConnectionObserver(
+ this,
+ TaskRunnerHelper::get(TaskType::Networking, getExecutionContext()));
m_observing = true;
}
}
void NetworkInformation::stopObserving() {
if (m_observing) {
- networkStateNotifier().removeObserver(
- this, TaskRunnerHelper::get(TaskType::Networking, getExecutionContext())
- .get());
+ networkStateNotifier().removeConnectionObserver(
+ this,
+ TaskRunnerHelper::get(TaskType::Networking, getExecutionContext()));
m_observing = false;
}
}
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698