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

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

Issue 11818036: Revert 175822 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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_browsertest.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"
9 8
10 namespace chrome { 9 namespace chrome {
11 10
12 const char kAboutScheme[] = "about"; 11 const char kAboutScheme[] = "about";
13 const char kBlobScheme[] = "blob"; 12 const char kBlobScheme[] = "blob";
14 13
15 // Before adding new chrome schemes please check with security@chromium.org. 14 // Before adding new chrome schemes please check with security@chromium.org.
16 // There are security implications associated with introducing new schemes. 15 // There are security implications associated with introducing new schemes.
17 const char kChromeDevToolsScheme[] = "chrome-devtools"; 16 const char kChromeDevToolsScheme[] = "chrome-devtools";
18 const char kChromeInternalScheme[] = "chrome-internal"; 17 const char kChromeInternalScheme[] = "chrome-internal";
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 59
61 // This URL is loaded when a page is swapped out and replaced by a page in a 60 // This URL is loaded when a page is swapped out and replaced by a page in a
62 // different renderer process. It must have a unique origin that cannot be 61 // different renderer process. It must have a unique origin that cannot be
63 // scripted by other pages in the process. 62 // scripted by other pages in the process.
64 const char kSwappedOutURL[] = "swappedout://"; 63 const char kSwappedOutURL[] = "swappedout://";
65 64
66 const char* const* GetSavableSchemes() { 65 const char* const* GetSavableSchemes() {
67 return GetSavableSchemesInternal(); 66 return GetSavableSchemesInternal();
68 } 67 }
69 68
70 bool HasWebUIScheme(const GURL& url) {
71 return
72 #if !defined(OS_IOS)
73 url.SchemeIs(chrome::kChromeDevToolsScheme) ||
74 url.SchemeIs(chrome::kChromeInternalScheme) ||
75 #endif
76 url.SchemeIs(chrome::kChromeUIScheme);
77 }
78
79 } // namespace content 69 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/url_constants.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698