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

Side by Side Diff: content/browser/net/browser_online_state_observer.h

Issue 1306423004: [NetInfo] Browser changes to support connection.downlinkMax (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor browser test fix Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_
6 #define CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_ 6 #define CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "net/base/network_change_notifier.h" 9 #include "net/base/network_change_notifier.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // Listens for changes to the online state and manages sending 13 // Listens for changes to the online state and manages sending
14 // updates to each RenderProcess via RenderProcessHost IPC. 14 // updates to each RenderProcess via RenderProcessHost IPC.
15 class BrowserOnlineStateObserver 15 class BrowserOnlineStateObserver
16 : public net::NetworkChangeNotifier::ConnectionTypeObserver { 16 : public net::NetworkChangeNotifier::MaxBandwidthObserver {
17 public: 17 public:
18 BrowserOnlineStateObserver(); 18 BrowserOnlineStateObserver();
19 ~BrowserOnlineStateObserver() override; 19 ~BrowserOnlineStateObserver() override;
20 20
21 // ConnectionTypeObserver implementation. 21 // MaxBandwidthObserver implementation.
22 void OnConnectionTypeChanged( 22 void OnMaxBandwidthChanged(
23 double max_bandwidth_mbps,
23 net::NetworkChangeNotifier::ConnectionType type) override; 24 net::NetworkChangeNotifier::ConnectionType type) override;
24 25
25 private: 26 private:
26 DISALLOW_COPY_AND_ASSIGN(BrowserOnlineStateObserver); 27 DISALLOW_COPY_AND_ASSIGN(BrowserOnlineStateObserver);
27 }; 28 };
28 29
29 } // namespace content 30 } // namespace content
30 31
31 #endif // CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_ 32 #endif // CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698