Chromium Code Reviews| 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/configuration_policy_handler.h" | 5 #include "chrome/browser/policy/configuration_policy_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1020 for (size_t i = 0; i != arraysize(kProxyModeValidationMap); ++i) { | 1020 for (size_t i = 0; i != arraysize(kProxyModeValidationMap); ++i) { |
| 1021 const ProxyModeValidationEntry& entry = kProxyModeValidationMap[i]; | 1021 const ProxyModeValidationEntry& entry = kProxyModeValidationMap[i]; |
| 1022 if (entry.mode_value != mode_value) | 1022 if (entry.mode_value != mode_value) |
| 1023 continue; | 1023 continue; |
| 1024 | 1024 |
| 1025 is_valid_mode = true; | 1025 is_valid_mode = true; |
| 1026 | 1026 |
| 1027 if (!entry.pac_url_allowed && pac_url) | 1027 if (!entry.pac_url_allowed && pac_url) |
| 1028 errors->AddError(kPolicyProxyPacUrl, entry.error_message_id); | 1028 errors->AddError(kPolicyProxyPacUrl, entry.error_message_id); |
| 1029 if (!entry.bypass_list_allowed && bypass_list) | 1029 if (!entry.bypass_list_allowed && bypass_list) |
| 1030 errors->AddError(kPolicyProxyPacUrl, entry.error_message_id); | 1030 errors->AddError(kPolicyProxyBypassList, entry.error_message_id); |
|
Mattias Nissler (ping if slow)
2011/10/28 15:18:51
good catch!
| |
| 1031 if (!entry.server_allowed && server) | 1031 if (!entry.server_allowed && server) |
| 1032 errors->AddError(kPolicyProxyPacUrl, entry.error_message_id); | 1032 errors->AddError(kPolicyProxyServer, entry.error_message_id); |
| 1033 | 1033 |
| 1034 if ((!entry.pac_url_allowed && pac_url) || | 1034 if ((!entry.pac_url_allowed && pac_url) || |
| 1035 (!entry.bypass_list_allowed && bypass_list) || | 1035 (!entry.bypass_list_allowed && bypass_list) || |
| 1036 (!entry.server_allowed && server)) { | 1036 (!entry.server_allowed && server)) { |
| 1037 return false; | 1037 return false; |
| 1038 } | 1038 } |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 if (!is_valid_mode) { | 1041 if (!is_valid_mode) { |
| 1042 errors->AddError(mode ? kPolicyProxyMode : kPolicyProxyServerMode, | 1042 errors->AddError(mode ? kPolicyProxyMode : kPolicyProxyServerMode, |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1319 list->push_back(new SyncPolicyHandler()); | 1319 list->push_back(new SyncPolicyHandler()); |
| 1320 | 1320 |
| 1321 #if !defined(OS_CHROMEOS) | 1321 #if !defined(OS_CHROMEOS) |
| 1322 list->push_back(new DownloadDirPolicyHandler()); | 1322 list->push_back(new DownloadDirPolicyHandler()); |
| 1323 #endif // !defined(OS_CHROME0S) | 1323 #endif // !defined(OS_CHROME0S) |
| 1324 | 1324 |
| 1325 return list; | 1325 return list; |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 } // namespace policy | 1328 } // namespace policy |
| OLD | NEW |