| OLD | NEW |
| 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 #include "chromeos/network/onc/onc_utils.h" | 5 #include "chromeos/network/onc/onc_utils.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 protected: | 256 protected: |
| 257 explicit OncMaskValues(const std::string& mask) | 257 explicit OncMaskValues(const std::string& mask) |
| 258 : mask_(mask) { | 258 : mask_(mask) { |
| 259 } | 259 } |
| 260 | 260 |
| 261 virtual scoped_ptr<base::Value> MapField( | 261 virtual scoped_ptr<base::Value> MapField( |
| 262 const std::string& field_name, | 262 const std::string& field_name, |
| 263 const OncValueSignature& object_signature, | 263 const OncValueSignature& object_signature, |
| 264 const base::Value& onc_value, | 264 const base::Value& onc_value, |
| 265 bool* found_unknown_field, | 265 bool* found_unknown_field, |
| 266 bool* error) OVERRIDE { | 266 bool* error) override { |
| 267 if (FieldIsCredential(object_signature, field_name)) { | 267 if (FieldIsCredential(object_signature, field_name)) { |
| 268 return scoped_ptr<base::Value>(new base::StringValue(mask_)); | 268 return scoped_ptr<base::Value>(new base::StringValue(mask_)); |
| 269 } else { | 269 } else { |
| 270 return Mapper::MapField(field_name, object_signature, onc_value, | 270 return Mapper::MapField(field_name, object_signature, onc_value, |
| 271 found_unknown_field, error); | 271 found_unknown_field, error); |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 | 274 |
| 275 // Mask to insert in place of the sensitive values. | 275 // Mask to insert in place of the sensitive values. |
| 276 std::string mask_; | 276 std::string mask_; |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 } | 690 } |
| 691 | 691 |
| 692 const base::ListValue* recommended_keys = NULL; | 692 const base::ListValue* recommended_keys = NULL; |
| 693 return (onc->GetList(recommended_property_key, &recommended_keys) && | 693 return (onc->GetList(recommended_property_key, &recommended_keys) && |
| 694 recommended_keys->Find(base::StringValue(property_basename)) != | 694 recommended_keys->Find(base::StringValue(property_basename)) != |
| 695 recommended_keys->end()); | 695 recommended_keys->end()); |
| 696 } | 696 } |
| 697 | 697 |
| 698 } // namespace onc | 698 } // namespace onc |
| 699 } // namespace chromeos | 699 } // namespace chromeos |
| OLD | NEW |