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

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

Issue 9691011: Merge 125635 - Don't put the error URL in the chrome:// scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 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 | « no previous file | 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) 2011 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 "base/string_util.h" 7 #include "base/string_util.h"
8 #include "googleurl/src/url_util.h" 8 #include "googleurl/src/url_util.h"
9 9
10 namespace { 10 namespace {
11 const char* kDefaultSavableSchemes[] = { 11 const char* kDefaultSavableSchemes[] = {
(...skipping 27 matching lines...) Expand all
39 const char kJavaScriptScheme[] = "javascript"; 39 const char kJavaScriptScheme[] = "javascript";
40 const char kMailToScheme[] = "mailto"; 40 const char kMailToScheme[] = "mailto";
41 const char kMetadataScheme[] = "metadata"; 41 const char kMetadataScheme[] = "metadata";
42 const char kViewSourceScheme[] = "view-source"; 42 const char kViewSourceScheme[] = "view-source";
43 43
44 const char kStandardSchemeSeparator[] = "://"; 44 const char kStandardSchemeSeparator[] = "://";
45 45
46 const char kAboutBlankURL[] = "about:blank"; 46 const char kAboutBlankURL[] = "about:blank";
47 const char kAboutCrashURL[] = "about:crash"; 47 const char kAboutCrashURL[] = "about:crash";
48 48
49 const char kUnreachableWebDataURL[] = "chrome://chromewebdata/"; 49 // This error URL is loaded in normal web renderer processes, so it should not
50 // have a chrome:// scheme that might let it be confused with a WebUI page.
51 const char kUnreachableWebDataURL[] = "data:text/html,chromewebdata";
50 52
51 const char** GetSavableSchemes() { 53 const char** GetSavableSchemes() {
52 return const_cast<const char**>(g_savable_schemes); 54 return const_cast<const char**>(g_savable_schemes);
53 } 55 }
54 56
55 void RegisterContentSchemes(const char** additional_savable_schemes) { 57 void RegisterContentSchemes(const char** additional_savable_schemes) {
56 // Don't need "chrome-internal" which was used in old versions of Chrome for 58 // Don't need "chrome-internal" which was used in old versions of Chrome for
57 // the new tab page. 59 // the new tab page.
58 url_util::AddStandardScheme(kChromeDevToolsScheme); 60 url_util::AddStandardScheme(kChromeDevToolsScheme);
59 url_util::AddStandardScheme(kChromeUIScheme); 61 url_util::AddStandardScheme(kChromeUIScheme);
(...skipping 18 matching lines...) Expand all
78 arraysize(kDefaultSavableSchemes) * sizeof(char*)); 80 arraysize(kDefaultSavableSchemes) * sizeof(char*));
79 for (int i = 0; i < schemes; ++i) { 81 for (int i = 0; i < schemes; ++i) {
80 g_savable_schemes[arraysize(kDefaultSavableSchemes) + i - 1] = 82 g_savable_schemes[arraysize(kDefaultSavableSchemes) + i - 1] =
81 base::strdup(additional_savable_schemes[i]); 83 base::strdup(additional_savable_schemes[i]);
82 } 84 }
83 g_savable_schemes[arraysize(kDefaultSavableSchemes) + schemes - 1] = 0; 85 g_savable_schemes[arraysize(kDefaultSavableSchemes) + schemes - 1] = 0;
84 } 86 }
85 } 87 }
86 88
87 } // namespace chrome 89 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698