Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/policy/configuration_policy_handler.cc

Issue 8413037: Display policy parsing errors in about:policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed extra byte, rebased Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/policy/configuration_policy_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/configuration_policy_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698