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

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

Issue 8728030: Infrastructure for accessing and manipulating network UI data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make clang happy. Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/network_ui_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 bool added() const { return added_; } 613 bool added() const { return added_; }
614 bool notify_failure() const { return notify_failure_; } 614 bool notify_failure() const { return notify_failure_; }
615 const std::string& profile_path() const { return profile_path_; } 615 const std::string& profile_path() const { return profile_path_; }
616 NetworkProfileType profile_type() const { return profile_type_; } 616 NetworkProfileType profile_type() const { return profile_type_; }
617 617
618 const std::string& unique_id() const { return unique_id_; } 618 const std::string& unique_id() const { return unique_id_; }
619 int priority_order() const { return priority_order_; } 619 int priority_order() const { return priority_order_; }
620 620
621 const std::string& proxy_config() const { return proxy_config_; } 621 const std::string& proxy_config() const { return proxy_config_; }
622 622
623 const DictionaryValue* ui_data() const { return &ui_data_; }
624 DictionaryValue* ui_data() { return &ui_data_; }
625
623 void set_notify_failure(bool state) { notify_failure_ = state; } 626 void set_notify_failure(bool state) { notify_failure_ = state; }
624 627
625 void SetPreferred(bool preferred); 628 void SetPreferred(bool preferred);
626 629
627 void SetAutoConnect(bool auto_connect); 630 void SetAutoConnect(bool auto_connect);
628 631
629 void SetName(const std::string& name); 632 void SetName(const std::string& name);
630 633
631 void SetSaveCredentials(bool save_credentials); 634 void SetSaveCredentials(bool save_credentials);
632 635
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 virtual void SetIntegerProperty(const char* prop, int i, int* dest); 699 virtual void SetIntegerProperty(const char* prop, int i, int* dest);
697 virtual void SetValueProperty(const char* prop, base::Value* val); 700 virtual void SetValueProperty(const char* prop, base::Value* val);
698 virtual void ClearProperty(const char* prop); 701 virtual void ClearProperty(const char* prop);
699 702
700 // This will clear the property if string is empty. Otherwise, it will set it. 703 // This will clear the property if string is empty. Otherwise, it will set it.
701 virtual void SetOrClearStringProperty(const char* prop, 704 virtual void SetOrClearStringProperty(const char* prop,
702 const std::string& str, 705 const std::string& str,
703 std::string* dest); 706 std::string* dest);
704 707
705 void set_unique_id(const std::string& unique_id) { unique_id_ = unique_id; } 708 void set_unique_id(const std::string& unique_id) { unique_id_ = unique_id; }
706 DictionaryValue* ui_data() { return &ui_data_; }
707 709
708 private: 710 private:
709 typedef std::map<PropertyIndex, base::Value*> PropertyMap; 711 typedef std::map<PropertyIndex, base::Value*> PropertyMap;
710 712
711 // This allows NetworkParser and its subclasses access to device 713 // This allows NetworkParser and its subclasses access to device
712 // privates so that they can be reconstituted during parsing. The 714 // privates so that they can be reconstituted during parsing. The
713 // parsers only access things through the private set_ functions so 715 // parsers only access things through the private set_ functions so
714 // that this class can evolve without having to change all the 716 // that this class can evolve without having to change all the
715 // parsers. 717 // parsers.
716 friend class NetworkParser; 718 friend class NetworkParser;
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 const std::string& service_path) = 0; 1753 const std::string& service_path) = 0;
1752 1754
1753 // Factory function, creates a new instance and returns ownership. 1755 // Factory function, creates a new instance and returns ownership.
1754 // For normal usage, access the singleton via CrosLibrary::Get(). 1756 // For normal usage, access the singleton via CrosLibrary::Get().
1755 static NetworkLibrary* GetImpl(bool stub); 1757 static NetworkLibrary* GetImpl(bool stub);
1756 }; 1758 };
1757 1759
1758 } // namespace chromeos 1760 } // namespace chromeos
1759 1761
1760 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 1762 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/network_ui_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698