| 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/browser/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 // We only handle about: schemes. | 903 // We only handle about: schemes. |
| 904 if (!url->SchemeIs(chrome::kAboutScheme)) | 904 if (!url->SchemeIs(chrome::kAboutScheme)) |
| 905 return false; | 905 return false; |
| 906 | 906 |
| 907 // about:blank is special. Frames are allowed to access about:blank, | 907 // about:blank is special. Frames are allowed to access about:blank, |
| 908 // but they are not allowed to access other types of about pages. | 908 // but they are not allowed to access other types of about pages. |
| 909 // Just ignore the about:blank and let the TAB_CONTENTS_WEB handle it. | 909 // Just ignore the about:blank and let the TAB_CONTENTS_WEB handle it. |
| 910 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutBlankURL)) | 910 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutBlankURL)) |
| 911 return false; | 911 return false; |
| 912 | 912 |
| 913 // Rewrite about:cache/* URLs to chrome://net-internals/view-cache/* | 913 // Rewrite about:cache/* URLs to chrome://view-http-cache/* |
| 914 if (StartsWithAboutSpecifier(*url, chrome::kAboutCacheURL)) { | 914 if (StartsWithAboutSpecifier(*url, chrome::kAboutCacheURL)) { |
| 915 *url = RemapAboutURL(chrome::kNetworkViewCacheURL + std::string("/"), | 915 *url = RemapAboutURL(chrome::kNetworkViewCacheURL, *url); |
| 916 *url); | |
| 917 return true; | 916 return true; |
| 918 } | 917 } |
| 919 | 918 |
| 920 // Rewrite about:net-internals/* URLs to chrome://net-internals/* | 919 // Rewrite about:net-internals/* URLs to chrome://net-internals/* |
| 921 if (StartsWithAboutSpecifier(*url, chrome::kAboutNetInternalsURL)) { | 920 if (StartsWithAboutSpecifier(*url, chrome::kAboutNetInternalsURL)) { |
| 922 *url = RemapAboutURL(chrome::kNetworkViewInternalsURL, *url); | 921 *url = RemapAboutURL(chrome::kNetworkViewInternalsURL, *url); |
| 923 return true; | 922 return true; |
| 924 } | 923 } |
| 925 | 924 |
| 926 // Rewrite about:appcache-internals/* URLs to chrome://appcache/* | 925 // Rewrite about:appcache-internals/* URLs to chrome://appcache/* |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 // Run the dialog. This will re-use the existing one if it's already up. | 992 // Run the dialog. This will re-use the existing one if it's already up. |
| 994 AboutIPCDialog::RunDialog(); | 993 AboutIPCDialog::RunDialog(); |
| 995 return true; | 994 return true; |
| 996 } | 995 } |
| 997 #endif | 996 #endif |
| 998 | 997 |
| 999 #endif // OFFICIAL_BUILD | 998 #endif // OFFICIAL_BUILD |
| 1000 | 999 |
| 1001 return false; | 1000 return false; |
| 1002 } | 1001 } |
| OLD | NEW |