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

Unified Diff: chrome/browser/policy/policy_error_map.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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/policy_error_map.h ('k') | chrome/browser/policy/policy_status_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_error_map.cc
diff --git a/chrome/browser/policy/policy_error_map.cc b/chrome/browser/policy/policy_error_map.cc
index bbe6e1cba4e5fa9894d50e82b438833311cb7aba..956392a6ab661624eab57d1b9b7ad53d771c2d6f 100644
--- a/chrome/browser/policy/policy_error_map.cc
+++ b/chrome/browser/policy/policy_error_map.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -50,18 +51,13 @@ void PolicyErrorMap::AddError(ConfigurationPolicyType policy,
AddError(PendingError(policy, message_id, ASCIIToUTF16(replacement)));
}
-ListValue* PolicyErrorMap::GetErrors(ConfigurationPolicyType policy) {
+string16 PolicyErrorMap::GetErrors(ConfigurationPolicyType policy) {
CheckReadyAndConvert();
std::pair<const_iterator, const_iterator> range = map_.equal_range(policy);
-
- if (range.first == range.second)
- return NULL;
-
- ListValue* list = new ListValue();
+ std::vector<string16> list;
for (const_iterator it = range.first; it != range.second; ++it)
- list->Append(Value::CreateStringValue(it->second));
-
- return list;
+ list.push_back(it->second);
+ return JoinString(list, ' ');
}
bool PolicyErrorMap::empty() {
« no previous file with comments | « chrome/browser/policy/policy_error_map.h ('k') | chrome/browser/policy/policy_status_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698