OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/api/messaging/native_messaging_policy_handle
r.h" | 5 #include "chrome/browser/extensions/api/messaging/native_messaging_policy_handle
r.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest
.h" | 10 #include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest
.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ValueTypeToString(base::Value::TYPE_STRING)); | 75 ValueTypeToString(base::Value::TYPE_STRING)); |
76 continue; | 76 continue; |
77 } | 77 } |
78 if (!(allow_wildcards_ && name == "*") && | 78 if (!(allow_wildcards_ && name == "*") && |
79 !NativeMessagingHostManifest::IsValidName(name)) { | 79 !NativeMessagingHostManifest::IsValidName(name)) { |
80 errors->AddError(policy_name(), | 80 errors->AddError(policy_name(), |
81 entry - list_value->begin(), | 81 entry - list_value->begin(), |
82 IDS_POLICY_VALUE_FORMAT_ERROR); | 82 IDS_POLICY_VALUE_FORMAT_ERROR); |
83 continue; | 83 continue; |
84 } | 84 } |
85 filtered_list->Append(new base::StringValue(name)); | 85 filtered_list->AppendString(name); |
86 } | 86 } |
87 | 87 |
88 if (names) | 88 if (names) |
89 *names = std::move(filtered_list); | 89 *names = std::move(filtered_list); |
90 | 90 |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 } // namespace extensions | 94 } // namespace extensions |
OLD | NEW |