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 "extensions/common/url_pattern_set.h" | 5 #include "extensions/common/url_pattern_set.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
14 #include "extensions/common/error_utils.h" | 14 #include "extensions/common/error_utils.h" |
15 #include "extensions/common/url_pattern.h" | 15 #include "extensions/common/url_pattern.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 const char kInvalidURLPatternError[] = "Invalid url pattern '*'"; | 22 const char kInvalidURLPatternError[] = "Invalid url pattern '*'"; |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 // static | 26 // static |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 for (size_t i = 0; i < value.GetSize(); ++i) { | 224 for (size_t i = 0; i < value.GetSize(); ++i) { |
225 std::string item; | 225 std::string item; |
226 if (!value.GetString(i, &item)) | 226 if (!value.GetString(i, &item)) |
227 return false; | 227 return false; |
228 patterns.push_back(item); | 228 patterns.push_back(item); |
229 } | 229 } |
230 return Populate(patterns, valid_schemes, allow_file_access, error); | 230 return Populate(patterns, valid_schemes, allow_file_access, error); |
231 } | 231 } |
232 | 232 |
233 } // namespace extensions | 233 } // namespace extensions |
OLD | NEW |