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

Side by Side Diff: third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp

Issue 2395543002: reflow comments in modules/[mediasource,plugins] (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/netinfo/NetworkInformation.h" 5 #include "modules/netinfo/NetworkInformation.h"
6 6
7 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "core/page/NetworkStateNotifier.h" 9 #include "core/page/NetworkStateNotifier.h"
10 #include "modules/EventTargetModules.h" 10 #include "modules/EventTargetModules.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 NetworkInformation* connection = new NetworkInformation(context); 48 NetworkInformation* connection = new NetworkInformation(context);
49 connection->suspendIfNeeded(); 49 connection->suspendIfNeeded();
50 return connection; 50 return connection;
51 } 51 }
52 52
53 NetworkInformation::~NetworkInformation() { 53 NetworkInformation::~NetworkInformation() {
54 ASSERT(!m_observing); 54 ASSERT(!m_observing);
55 } 55 }
56 56
57 String NetworkInformation::type() const { 57 String NetworkInformation::type() const {
58 // m_type is only updated when listening for events, so ask networkStateNotifi er 58 // m_type is only updated when listening for events, so ask
59 // if not listening (crbug.com/379841). 59 // networkStateNotifier if not listening (crbug.com/379841).
60 if (!m_observing) 60 if (!m_observing)
61 return connectionTypeToString(networkStateNotifier().connectionType()); 61 return connectionTypeToString(networkStateNotifier().connectionType());
62 62
63 // If observing, return m_type which changes when the event fires, per spec. 63 // If observing, return m_type which changes when the event fires, per spec.
64 return connectionTypeToString(m_type); 64 return connectionTypeToString(m_type);
65 } 65 }
66 66
67 double NetworkInformation::downlinkMax() const { 67 double NetworkInformation::downlinkMax() const {
68 if (!m_observing) 68 if (!m_observing)
69 return networkStateNotifier().maxBandwidth(); 69 return networkStateNotifier().maxBandwidth();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 m_downlinkMaxMbps(networkStateNotifier().maxBandwidth()), 152 m_downlinkMaxMbps(networkStateNotifier().maxBandwidth()),
153 m_observing(false), 153 m_observing(false),
154 m_contextStopped(false) {} 154 m_contextStopped(false) {}
155 155
156 DEFINE_TRACE(NetworkInformation) { 156 DEFINE_TRACE(NetworkInformation) {
157 EventTargetWithInlineData::trace(visitor); 157 EventTargetWithInlineData::trace(visitor);
158 ActiveDOMObject::trace(visitor); 158 ActiveDOMObject::trace(visitor);
159 } 159 }
160 160
161 } // namespace blink 161 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698