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

Side by Side Diff: chrome/browser/chromeos/options/network_property_ui_data.h

Issue 427903004: Support Managed NetworkState format dictionaries for controlled settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_ 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 19 matching lines...) Expand all
30 explicit NetworkPropertyUIData(::onc::ONCSource onc_source); 30 explicit NetworkPropertyUIData(::onc::ONCSource onc_source);
31 31
32 ~NetworkPropertyUIData(); 32 ~NetworkPropertyUIData();
33 33
34 // Update the property object from dictionary, reading the key given by 34 // Update the property object from dictionary, reading the key given by
35 // |property_key|. 35 // |property_key|.
36 void ParseOncProperty(::onc::ONCSource onc_source, 36 void ParseOncProperty(::onc::ONCSource onc_source,
37 const base::DictionaryValue* onc, 37 const base::DictionaryValue* onc,
38 const std::string& property_key); 38 const std::string& property_key);
39 39
40 // Set the onc source and default value. TODO(stevenjb): Remove. This is
41 // a temporary helper method for the internet_options_handler.cc migraiton.
armansito 2014/07/31 19:15:46 nit: s/migraiton/migration/
stevenjb 2014/08/01 00:53:41 Done.
42 void SetOncSourceAndValue(::onc::ONCSource onc_source,
43 const base::Value* value);
44
40 const base::Value* default_value() const { return default_value_.get(); } 45 const base::Value* default_value() const { return default_value_.get(); }
46 const ::onc::ONCSource& onc_source() const { return onc_source_; }
47
41 bool IsManaged() const { 48 bool IsManaged() const {
42 return (onc_source_ == ::onc::ONC_SOURCE_DEVICE_POLICY || 49 return (onc_source_ == ::onc::ONC_SOURCE_DEVICE_POLICY ||
43 onc_source_ == ::onc::ONC_SOURCE_USER_POLICY); 50 onc_source_ == ::onc::ONC_SOURCE_USER_POLICY);
44 } 51 }
45 bool IsEditable() const { return !IsManaged(); } 52 bool IsEditable() const { return !IsManaged(); }
46 53
47 private: 54 private:
48 ::onc::ONCSource onc_source_; 55 ::onc::ONCSource onc_source_;
49 scoped_ptr<base::Value> default_value_; 56 scoped_ptr<base::Value> default_value_;
50 57
51 DISALLOW_COPY_AND_ASSIGN(NetworkPropertyUIData); 58 DISALLOW_COPY_AND_ASSIGN(NetworkPropertyUIData);
52 }; 59 };
53 60
54 } // namespace chromeos 61 } // namespace chromeos
55 62
56 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_ 63 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698