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

Side by Side Diff: content/public/common/url_constants.cc

Issue 12387070: content: Move more constants from url_constants.h into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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/public/common/url_constants.h ('k') | content/renderer/render_view_impl.cc » ('j') | 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 "content/public/common/url_constants.h" 5 #include "content/public/common/url_constants.h"
6 6
7 #include "content/common/savable_url_schemes.h" 7 #include "content/common/savable_url_schemes.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 9
10 namespace chrome { 10 namespace chrome {
(...skipping 27 matching lines...) Expand all
38 const char kChromeUIDevToolsHost[] = "devtools"; 38 const char kChromeUIDevToolsHost[] = "devtools";
39 const char kChromeUIGpuHost[] = "gpu"; 39 const char kChromeUIGpuHost[] = "gpu";
40 const char kChromeUIHistogramHost[] = "histograms"; 40 const char kChromeUIHistogramHost[] = "histograms";
41 const char kChromeUIMediaInternalsHost[] = "media-internals"; 41 const char kChromeUIMediaInternalsHost[] = "media-internals";
42 const char kChromeUINetworkViewCacheHost[] = "view-http-cache"; 42 const char kChromeUINetworkViewCacheHost[] = "view-http-cache";
43 const char kChromeUIResourcesHost[] = "resources"; 43 const char kChromeUIResourcesHost[] = "resources";
44 const char kChromeUITcmallocHost[] = "tcmalloc"; 44 const char kChromeUITcmallocHost[] = "tcmalloc";
45 const char kChromeUITracingHost[] = "tracing"; 45 const char kChromeUITracingHost[] = "tracing";
46 const char kChromeUIWebRTCInternalsHost[] = "webrtc-internals"; 46 const char kChromeUIWebRTCInternalsHost[] = "webrtc-internals";
47 47
48 } // namespace chrome
49
50 namespace content {
51
48 const char kChromeUICrashURL[] = "chrome://crash"; 52 const char kChromeUICrashURL[] = "chrome://crash";
49 const char kChromeUIGpuCleanURL[] = "chrome://gpuclean"; 53 const char kChromeUIGpuCleanURL[] = "chrome://gpuclean";
50 const char kChromeUIGpuCrashURL[] = "chrome://gpucrash"; 54 const char kChromeUIGpuCrashURL[] = "chrome://gpucrash";
51 const char kChromeUIGpuHangURL[] = "chrome://gpuhang"; 55 const char kChromeUIGpuHangURL[] = "chrome://gpuhang";
52 const char kChromeUIHangURL[] = "chrome://hang"; 56 const char kChromeUIHangURL[] = "chrome://hang";
53 const char kChromeUIKillURL[] = "chrome://kill"; 57 const char kChromeUIKillURL[] = "chrome://kill";
54 const char kChromeUIPpapiFlashCrashURL[] = "chrome://ppapiflashcrash"; 58 const char kChromeUIPpapiFlashCrashURL[] = "chrome://ppapiflashcrash";
55 const char kChromeUIPpapiFlashHangURL[] = "chrome://ppapiflashhang"; 59 const char kChromeUIPpapiFlashHangURL[] = "chrome://ppapiflashhang";
56 60
57 } // namespace chrome
58
59 namespace content {
60
61 const char kStandardSchemeSeparator[] = "://"; 61 const char kStandardSchemeSeparator[] = "://";
62 62
63 // This error URL is loaded in normal web renderer processes, so it should not 63 // This error URL is loaded in normal web renderer processes, so it should not
64 // have a chrome:// scheme that might let it be confused with a WebUI page. 64 // have a chrome:// scheme that might let it be confused with a WebUI page.
65 const char kUnreachableWebDataURL[] = "data:text/html,chromewebdata"; 65 const char kUnreachableWebDataURL[] = "data:text/html,chromewebdata";
66 66
67 const char kChromeUINetworkViewCacheURL[] = "chrome://view-http-cache/"; 67 const char kChromeUINetworkViewCacheURL[] = "chrome://view-http-cache/";
68 const char kChromeUIShorthangURL[] = "chrome://shorthang"; 68 const char kChromeUIShorthangURL[] = "chrome://shorthang";
69 69
70 // This URL is loaded when a page is swapped out and replaced by a page in a 70 // This URL is loaded when a page is swapped out and replaced by a page in a
71 // different renderer process. It must have a unique origin that cannot be 71 // different renderer process. It must have a unique origin that cannot be
72 // scripted by other pages in the process. 72 // scripted by other pages in the process.
73 const char kSwappedOutURL[] = "swappedout://"; 73 const char kSwappedOutURL[] = "swappedout://";
74 74
75 const char* const* GetSavableSchemes() { 75 const char* const* GetSavableSchemes() {
76 return GetSavableSchemesInternal(); 76 return GetSavableSchemesInternal();
77 } 77 }
78 78
79 bool HasWebUIScheme(const GURL& url) { 79 bool HasWebUIScheme(const GURL& url) {
80 return 80 return
81 #if !defined(OS_IOS) 81 #if !defined(OS_IOS)
82 url.SchemeIs(chrome::kChromeDevToolsScheme) || 82 url.SchemeIs(chrome::kChromeDevToolsScheme) ||
83 url.SchemeIs(chrome::kChromeInternalScheme) || 83 url.SchemeIs(chrome::kChromeInternalScheme) ||
84 #endif 84 #endif
85 url.SchemeIs(chrome::kChromeUIScheme); 85 url.SchemeIs(chrome::kChromeUIScheme);
86 } 86 }
87 87
88 } // namespace content 88 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/url_constants.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698