| 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 "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 Loading... |
| 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 |
| OLD | NEW |