OLD | NEW |
---|---|
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 #include "chrome/browser/policy/network_configuration_updater.h" | 5 #include "chrome/browser/policy/network_configuration_updater.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/cros/network_library.h" | 7 #include "chrome/browser/chromeos/cros/network_library.h" |
8 #include "chrome/browser/policy/policy_map.h" | 8 #include "chrome/browser/policy/policy_map.h" |
9 #include "policy/policy_constants.h" | 9 #include "policy/policy_constants.h" |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 const base::Value* value = policy_map.Get(policy_type); | 49 const base::Value* value = policy_map.Get(policy_type); |
50 if (value != NULL) { | 50 if (value != NULL) { |
51 // If the policy is not a string, we issue a warning, but still clear the | 51 // If the policy is not a string, we issue a warning, but still clear the |
52 // network configuration. | 52 // network configuration. |
53 if (!value->GetAsString(&new_network_config)) | 53 if (!value->GetAsString(&new_network_config)) |
54 LOG(WARNING) << "Invalid network configuration."; | 54 LOG(WARNING) << "Invalid network configuration."; |
55 } | 55 } |
56 | 56 |
57 if (*cached_value != new_network_config) { | 57 if (*cached_value != new_network_config) { |
58 *cached_value = new_network_config; | 58 *cached_value = new_network_config; |
59 if (!network_library_->LoadOncNetworks(new_network_config, "")) | 59 std::string error; |
60 LOG(WARNING) << "Network library failed to load ONC configuration."; | 60 if (!network_library_->LoadOncNetworks(new_network_config, "", &error)) |
Mattias Nissler (ping if slow)
2011/12/14 22:45:12
you need curlies here.
Charlie Lee
2011/12/14 22:52:02
Done.
| |
61 LOG(WARNING) << "Network library failed to load ONC configuration:" | |
62 << error; | |
61 } | 63 } |
62 } | 64 } |
63 | 65 |
64 } // namespace policy | 66 } // namespace policy |
OLD | NEW |