| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/common/extensions/url_pattern.h" | 5 #include "chrome/common/extensions/url_pattern.h" |
| 6 | 6 |
| 7 #include "base/string_piece.h" | 7 #include "base/string_piece.h" |
| 8 #include "base/string_split.h" |
| 8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 9 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 10 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 11 | 12 |
| 12 // TODO(aa): Consider adding chrome-extension? What about more obscure ones | 13 // TODO(aa): Consider adding chrome-extension? What about more obscure ones |
| 13 // like data: and javascript: ? | 14 // like data: and javascript: ? |
| 14 // Note: keep this array in sync with kValidSchemeMasks. | 15 // Note: keep this array in sync with kValidSchemeMasks. |
| 15 static const char* kValidSchemes[] = { | 16 static const char* kValidSchemes[] = { |
| 16 chrome::kHttpScheme, | 17 chrome::kHttpScheme, |
| 17 chrome::kHttpsScheme, | 18 chrome::kHttpsScheme, |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 if (MatchesScheme(kValidSchemes[i])) { | 262 if (MatchesScheme(kValidSchemes[i])) { |
| 262 URLPattern temp = *this; | 263 URLPattern temp = *this; |
| 263 temp.SetScheme(kValidSchemes[i]); | 264 temp.SetScheme(kValidSchemes[i]); |
| 264 temp.set_match_all_urls(false); | 265 temp.set_match_all_urls(false); |
| 265 result.push_back(temp); | 266 result.push_back(temp); |
| 266 } | 267 } |
| 267 } | 268 } |
| 268 | 269 |
| 269 return result; | 270 return result; |
| 270 } | 271 } |
| OLD | NEW |