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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.h

Issue 7714004: base: Add AsList() function to Value API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 enum TechnologyFamily technology_family() const { return technology_family_; } 407 enum TechnologyFamily technology_family() const { return technology_family_; }
408 const CellularApnList& provider_apn_list() const { 408 const CellularApnList& provider_apn_list() const {
409 return provider_apn_list_; 409 return provider_apn_list_;
410 } 410 }
411 411
412 // Updates the property specified by |key| with the contents of 412 // Updates the property specified by |key| with the contents of
413 // |value|. Returns false on failure. Upon success, returns the 413 // |value|. Returns false on failure. Upon success, returns the
414 // PropertyIndex that was updated in |index|. |index| may be NULL 414 // PropertyIndex that was updated in |index|. |index| may be NULL
415 // if not needed. 415 // if not needed.
416 bool UpdateStatus(const std::string& key, 416 bool UpdateStatus(const std::string& key,
417 const Value& value, 417 Value* value,
418 PropertyIndex *index); 418 PropertyIndex *index);
419 419
420 NativeNetworkDeviceParser* device_parser() { return device_parser_.get(); } 420 NativeNetworkDeviceParser* device_parser() { return device_parser_.get(); }
421 421
422 protected: 422 protected:
423 void set_unique_id(const std::string& unique_id) { unique_id_ = unique_id; } 423 void set_unique_id(const std::string& unique_id) { unique_id_ = unique_id; }
424 424
425 private: 425 private:
426 // This allows NetworkDeviceParser and its subclasses access to 426 // This allows NetworkDeviceParser and its subclasses access to
427 // device privates so that they can be reconstituted during parsing. 427 // device privates so that they can be reconstituted during parsing.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 633 }
634 static bool IsDisconnectedState(ConnectionState state) { 634 static bool IsDisconnectedState(ConnectionState state) {
635 return (state == STATE_UNKNOWN || 635 return (state == STATE_UNKNOWN ||
636 state == STATE_IDLE || 636 state == STATE_IDLE ||
637 state == STATE_DISCONNECT || 637 state == STATE_DISCONNECT ||
638 state == STATE_FAILURE || 638 state == STATE_FAILURE ||
639 state == STATE_ACTIVATION_FAILURE); 639 state == STATE_ACTIVATION_FAILURE);
640 } 640 }
641 641
642 virtual bool UpdateStatus(const std::string& key, 642 virtual bool UpdateStatus(const std::string& key,
643 const Value& value, 643 Value* value,
644 PropertyIndex* index); 644 PropertyIndex* index);
645 645
646 protected: 646 protected:
647 Network(const std::string& service_path, 647 Network(const std::string& service_path,
648 ConnectionType type, 648 ConnectionType type,
649 NativeNetworkParser* parser); 649 NativeNetworkParser* parser);
650 650
651 // Set the state and update flags if necessary. 651 // Set the state and update flags if necessary.
652 void SetState(ConnectionState state); 652 void SetState(ConnectionState state);
653 653
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 virtual void SwitchToPreferredNetwork() = 0; 1629 virtual void SwitchToPreferredNetwork() = 0;
1630 1630
1631 // Factory function, creates a new instance and returns ownership. 1631 // Factory function, creates a new instance and returns ownership.
1632 // For normal usage, access the singleton via CrosLibrary::Get(). 1632 // For normal usage, access the singleton via CrosLibrary::Get().
1633 static NetworkLibrary* GetImpl(bool stub); 1633 static NetworkLibrary* GetImpl(bool stub);
1634 }; 1634 };
1635 1635
1636 } // namespace chromeos 1636 } // namespace chromeos
1637 1637
1638 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 1638 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/native_network_parser.cc ('k') | chrome/browser/chromeos/cros/network_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698