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 "extensions/common/manifest_handlers/externally_connectable.h" | 5 #include "extensions/common/manifest_handlers/externally_connectable.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
11 #include "components/crx_file/id_util.h" | 13 #include "components/crx_file/id_util.h" |
12 #include "extensions/common/api/extensions_manifest_types.h" | 14 #include "extensions/common/api/extensions_manifest_types.h" |
13 #include "extensions/common/error_utils.h" | 15 #include "extensions/common/error_utils.h" |
14 #include "extensions/common/manifest_constants.h" | 16 #include "extensions/common/manifest_constants.h" |
15 #include "extensions/common/manifest_handlers/permissions_parser.h" | 17 #include "extensions/common/manifest_handlers/permissions_parser.h" |
16 #include "extensions/common/permissions/api_permission_set.h" | 18 #include "extensions/common/permissions/api_permission_set.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 } | 220 } |
219 | 221 |
220 bool ExternallyConnectableInfo::IdCanConnect(const std::string& id) { | 222 bool ExternallyConnectableInfo::IdCanConnect(const std::string& id) { |
221 if (all_ids) | 223 if (all_ids) |
222 return true; | 224 return true; |
223 DCHECK(base::STLIsSorted(ids)); | 225 DCHECK(base::STLIsSorted(ids)); |
224 return std::binary_search(ids.begin(), ids.end(), id); | 226 return std::binary_search(ids.begin(), ids.end(), id); |
225 } | 227 } |
226 | 228 |
227 } // namespace extensions | 229 } // namespace extensions |
OLD | NEW |