Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: extensions/common/url_pattern.cc

Issue 104043010: Cleanup: Move kFileSystemScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 5 #include "extensions/common/url_pattern.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "content/public/common/url_constants.h" 11 #include "content/public/common/url_constants.h"
12 #include "extensions/common/constants.h" 12 #include "extensions/common/constants.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 #include "url/url_util.h" 14 #include "url/url_util.h"
15 15
16 const char URLPattern::kAllUrlsPattern[] = "<all_urls>"; 16 const char URLPattern::kAllUrlsPattern[] = "<all_urls>";
17 17
18 namespace { 18 namespace {
19 19
20 // TODO(aa): What about more obscure schemes like data: and javascript: ? 20 // TODO(aa): What about more obscure schemes like data: and javascript: ?
21 // Note: keep this array in sync with kValidSchemeMasks. 21 // Note: keep this array in sync with kValidSchemeMasks.
22 const char* kValidSchemes[] = { 22 const char* kValidSchemes[] = {
23 content::kHttpScheme, 23 content::kHttpScheme,
24 content::kHttpsScheme, 24 content::kHttpsScheme,
25 chrome::kFileScheme, 25 chrome::kFileScheme,
26 content::kFtpScheme, 26 content::kFtpScheme,
27 chrome::kChromeUIScheme, 27 chrome::kChromeUIScheme,
28 extensions::kExtensionScheme, 28 extensions::kExtensionScheme,
29 chrome::kFileSystemScheme, 29 content::kFileSystemScheme,
30 }; 30 };
31 31
32 const int kValidSchemeMasks[] = { 32 const int kValidSchemeMasks[] = {
33 URLPattern::SCHEME_HTTP, 33 URLPattern::SCHEME_HTTP,
34 URLPattern::SCHEME_HTTPS, 34 URLPattern::SCHEME_HTTPS,
35 URLPattern::SCHEME_FILE, 35 URLPattern::SCHEME_FILE,
36 URLPattern::SCHEME_FTP, 36 URLPattern::SCHEME_FTP,
37 URLPattern::SCHEME_CHROMEUI, 37 URLPattern::SCHEME_CHROMEUI,
38 URLPattern::SCHEME_EXTENSION, 38 URLPattern::SCHEME_EXTENSION,
39 URLPattern::SCHEME_FILESYSTEM, 39 URLPattern::SCHEME_FILESYSTEM,
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 return result; 538 return result;
539 } 539 }
540 540
541 // static 541 // static
542 const char* URLPattern::GetParseResultString( 542 const char* URLPattern::GetParseResultString(
543 URLPattern::ParseResult parse_result) { 543 URLPattern::ParseResult parse_result) {
544 return kParseResultMessages[parse_result]; 544 return kParseResultMessages[parse_result];
545 } 545 }
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698