| 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 #include "chromeos/network/managed_network_configuration_handler_impl.h" | 5 #include "chromeos/network/managed_network_configuration_handler_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const std::string& error_name) { | 65 const std::string& error_name) { |
| 66 std::string error_msg = "ManagedConfig Error: " + error_name; | 66 std::string error_msg = "ManagedConfig Error: " + error_name; |
| 67 NET_LOG_ERROR(error_msg, service_path); | 67 NET_LOG_ERROR(error_msg, service_path); |
| 68 network_handler::RunErrorCallback( | 68 network_handler::RunErrorCallback( |
| 69 error_callback, service_path, error_name, error_msg); | 69 error_callback, service_path, error_name, error_msg); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void LogErrorWithDict(const tracked_objects::Location& from_where, | 72 void LogErrorWithDict(const tracked_objects::Location& from_where, |
| 73 const std::string& error_name, | 73 const std::string& error_name, |
| 74 scoped_ptr<base::DictionaryValue> error_data) { | 74 scoped_ptr<base::DictionaryValue> error_data) { |
| 75 network_event_log::internal::AddEntry( | 75 device_event_log::AddEntry(from_where.file_name(), from_where.line_number(), |
| 76 from_where.file_name(), from_where.line_number(), | 76 device_event_log::LOG_TYPE_NETWORK, |
| 77 network_event_log::LOG_LEVEL_ERROR, | 77 device_event_log::LOG_LEVEL_ERROR, error_name); |
| 78 error_name, ""); | |
| 79 } | 78 } |
| 80 | 79 |
| 81 const base::DictionaryValue* GetByGUID(const GuidToPolicyMap& policies, | 80 const base::DictionaryValue* GetByGUID(const GuidToPolicyMap& policies, |
| 82 const std::string& guid) { | 81 const std::string& guid) { |
| 83 GuidToPolicyMap::const_iterator it = policies.find(guid); | 82 GuidToPolicyMap::const_iterator it = policies.find(guid); |
| 84 if (it == policies.end()) | 83 if (it == policies.end()) |
| 85 return NULL; | 84 return NULL; |
| 86 return it->second; | 85 return it->second; |
| 87 } | 86 } |
| 88 | 87 |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 scoped_ptr<base::DictionaryValue> network_properties, | 787 scoped_ptr<base::DictionaryValue> network_properties, |
| 789 GetDevicePropertiesCallback send_callback, | 788 GetDevicePropertiesCallback send_callback, |
| 790 const std::string& error_name, | 789 const std::string& error_name, |
| 791 scoped_ptr<base::DictionaryValue> error_data) { | 790 scoped_ptr<base::DictionaryValue> error_data) { |
| 792 NET_LOG_ERROR("Error getting device properties", service_path); | 791 NET_LOG_ERROR("Error getting device properties", service_path); |
| 793 send_callback.Run(service_path, network_properties.Pass()); | 792 send_callback.Run(service_path, network_properties.Pass()); |
| 794 } | 793 } |
| 795 | 794 |
| 796 | 795 |
| 797 } // namespace chromeos | 796 } // namespace chromeos |
| OLD | NEW |