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

Side by Side Diff: chromeos/network/network_state_handler.h

Issue 2701463003: Create a Tether section in the system tray network list. (Closed)
Patch Set: Use NetworkStateHandler::GetTechnologyState and explicitly fetch the Tether networks in NetworkList… 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 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 CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // themselves and disable any networking. 84 // themselves and disable any networking.
85 void Shutdown(); 85 void Shutdown();
86 86
87 // Add/remove observers. 87 // Add/remove observers.
88 void AddObserver(NetworkStateHandlerObserver* observer, 88 void AddObserver(NetworkStateHandlerObserver* observer,
89 const tracked_objects::Location& from_here); 89 const tracked_objects::Location& from_here);
90 void RemoveObserver(NetworkStateHandlerObserver* observer, 90 void RemoveObserver(NetworkStateHandlerObserver* observer,
91 const tracked_objects::Location& from_here); 91 const tracked_objects::Location& from_here);
92 92
93 // Returns the state for technology |type|. Only 93 // Returns the state for technology |type|. Only
94 // NetworkTypePattern::Primitive, ::Mobile and ::Ethernet are supported. 94 // NetworkTypePattern::Primitive, ::Mobile, ::Ethernet, and ::Tether are
95 // supported.
95 TechnologyState GetTechnologyState(const NetworkTypePattern& type) const; 96 TechnologyState GetTechnologyState(const NetworkTypePattern& type) const;
96 bool IsTechnologyAvailable(const NetworkTypePattern& type) const { 97 bool IsTechnologyAvailable(const NetworkTypePattern& type) const {
97 return GetTechnologyState(type) != TECHNOLOGY_UNAVAILABLE; 98 return GetTechnologyState(type) != TECHNOLOGY_UNAVAILABLE;
98 } 99 }
99 bool IsTechnologyEnabled(const NetworkTypePattern& type) const { 100 bool IsTechnologyEnabled(const NetworkTypePattern& type) const {
100 return GetTechnologyState(type) == TECHNOLOGY_ENABLED; 101 return GetTechnologyState(type) == TECHNOLOGY_ENABLED;
101 } 102 }
102 bool IsTechnologyProhibited(const NetworkTypePattern& type) const { 103 bool IsTechnologyProhibited(const NetworkTypePattern& type) const {
103 return GetTechnologyState(type) == TECHNOLOGY_PROHIBITED; 104 return GetTechnologyState(type) == TECHNOLOGY_PROHIBITED;
104 } 105 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 434
434 // Ensure that Shutdown() gets called exactly once. 435 // Ensure that Shutdown() gets called exactly once.
435 bool did_shutdown_ = false; 436 bool did_shutdown_ = false;
436 437
437 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); 438 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler);
438 }; 439 };
439 440
440 } // namespace chromeos 441 } // namespace chromeos
441 442
442 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 443 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698