| OLD | NEW |
| 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 <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "components/onc/onc_constants.h" | 12 #include "components/onc/onc_constants.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class DictionaryValue; | 15 class DictionaryValue; |
| 16 class Value; | 16 class Value; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace chromeos { | 19 namespace chromeos { |
| 20 | 20 |
| 21 // Holds meta information for a network property: Whether the property is under | 21 // Holds meta information for a network property: Whether the property is under |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 const base::Value* default_value() const { return default_value_.get(); } | 40 const base::Value* default_value() const { return default_value_.get(); } |
| 41 bool IsManaged() const { | 41 bool IsManaged() const { |
| 42 return (onc_source_ == ::onc::ONC_SOURCE_DEVICE_POLICY || | 42 return (onc_source_ == ::onc::ONC_SOURCE_DEVICE_POLICY || |
| 43 onc_source_ == ::onc::ONC_SOURCE_USER_POLICY); | 43 onc_source_ == ::onc::ONC_SOURCE_USER_POLICY); |
| 44 } | 44 } |
| 45 bool IsEditable() const { return !IsManaged(); } | 45 bool IsEditable() const { return !IsManaged(); } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 ::onc::ONCSource onc_source_; | 48 ::onc::ONCSource onc_source_; |
| 49 scoped_ptr<base::Value> default_value_; | 49 std::unique_ptr<base::Value> default_value_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(NetworkPropertyUIData); | 51 DISALLOW_COPY_AND_ASSIGN(NetworkPropertyUIData); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace chromeos | 54 } // namespace chromeos |
| 55 | 55 |
| 56 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_PROPERTY_UI_DATA_H_ |
| OLD | NEW |