OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/permissions/permissions_api_helpers.h" | 5 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 *error = ErrorUtils::FormatErrorMessage( | 139 *error = ErrorUtils::FormatErrorMessage( |
140 kInvalidOrigin, | 140 kInvalidOrigin, |
141 *it, | 141 *it, |
142 URLPattern::GetParseResultString(parse_result)); | 142 URLPattern::GetParseResultString(parse_result)); |
143 return NULL; | 143 return NULL; |
144 } | 144 } |
145 origins.AddPattern(origin); | 145 origins.AddPattern(origin); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 return base::WrapUnique( | 149 return base::MakeUnique<PermissionSet>(apis, manifest_permissions, origins, |
150 new PermissionSet(apis, manifest_permissions, origins, URLPatternSet())); | 150 URLPatternSet()); |
151 } | 151 } |
152 | 152 |
153 } // namespace permissions_api_helpers | 153 } // namespace permissions_api_helpers |
154 } // namespace extensions | 154 } // namespace extensions |
OLD | NEW |