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

Side by Side Diff: chrome/common/url_constants.cc

Issue 7049004: Normalize chrome://foo/ trailing slashes, ChromeURLHostEquals comparison, RIP dead consts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace StartsWithASCII with scheme and host matching. Created 9 years, 7 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 | « chrome/common/url_constants.h ('k') | 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) 2011 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/common/url_constants.h"
tfarina 2011/05/19 23:19:10 thanks.
msw 2011/05/19 23:55:46 :)
6
5 #include <stdlib.h> 7 #include <stdlib.h>
tfarina 2011/05/19 23:19:10 Is this include really needed?
msw 2011/05/19 23:55:46 Apparently not; removed!
6 8
7 #include "chrome/common/url_constants.h"
8 #include "googleurl/src/url_util.h" 9 #include "googleurl/src/url_util.h"
9 10
10 namespace chrome { 11 namespace chrome {
11 12
12 #if defined(OS_CHROMEOS) 13 #if defined(OS_CHROMEOS)
13 const char kCrosScheme[] = "cros"; 14 const char kCrosScheme[] = "cros";
14 #endif 15 #endif
15 16
16 const char* kSavableSchemes[] = { 17 const char* kSavableSchemes[] = {
17 kHttpScheme, 18 kHttpScheme,
(...skipping 26 matching lines...) Expand all
44 const char kAboutShorthangURL[] = "about:shorthang"; 45 const char kAboutShorthangURL[] = "about:shorthang";
45 const char kAboutSyncURL[] = "about:sync"; 46 const char kAboutSyncURL[] = "about:sync";
46 const char kAboutSyncInternalsURL[] = "about:sync-internals"; 47 const char kAboutSyncInternalsURL[] = "about:sync-internals";
47 const char kAboutTermsURL[] = "about:terms"; 48 const char kAboutTermsURL[] = "about:terms";
48 const char kAboutVersionURL[] = "about:version"; 49 const char kAboutVersionURL[] = "about:version";
49 50
50 // Use an obfuscated URL to make this nondiscoverable, we only want this 51 // Use an obfuscated URL to make this nondiscoverable, we only want this
51 // to be used for testing. 52 // to be used for testing.
52 const char kAboutBrowserCrash[] = "about:inducebrowsercrashforrealz"; 53 const char kAboutBrowserCrash[] = "about:inducebrowsercrashforrealz";
53 54
54 const char kChromeUIAboutAboutURL[] = "chrome://about/about"; 55 const char kChromeUIAboutAboutURL[] = "chrome://about/about/";
55 const char kChromeUIAboutCreditsURL[] = "chrome://about/credits"; 56 const char kChromeUIAboutCreditsURL[] = "chrome://about/credits/";
56 const char kChromeUIAboutURL[] = "chrome://settings/about"; 57 const char kChromeUIAboutURL[] = "chrome://settings/about/";
57 const char kChromeUIAppLauncherURL[] = "chrome://newtab/#mode=app-launcher";
58 const char kChromeUIBookmarksURL[] = "chrome://bookmarks/"; 58 const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
59 const char kChromeUIBugReportURL[] = "chrome://bugreport/"; 59 const char kChromeUIBugReportURL[] = "chrome://bugreport/";
60 const char kChromeUIConflictsURL[] = "chrome://conflicts/"; 60 const char kChromeUIConflictsURL[] = "chrome://conflicts/";
61 const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/"; 61 const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/";
62 const char kChromeUICrashesURL[] = "chrome://crashes/"; 62 const char kChromeUICrashesURL[] = "chrome://crashes/";
63 const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/"; 63 const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/";
64 const char kChromeUIDownloadsURL[] = "chrome://downloads/"; 64 const char kChromeUIDownloadsURL[] = "chrome://downloads/";
65 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/"; 65 const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/";
66 const char kChromeUIExtensionsURL[] = "chrome://extensions/"; 66 const char kChromeUIExtensionsURL[] = "chrome://extensions/";
67 const char kChromeUIFaviconURL[] = "chrome://favicon/"; 67 const char kChromeUIFaviconURL[] = "chrome://favicon/";
68 const char kChromeUIFlagsURL[] = "chrome://flags/"; 68 const char kChromeUIFlagsURL[] = "chrome://flags/";
69 const char kChromeUIHistory2URL[] = "chrome://history2/"; 69 const char kChromeUIHistory2URL[] = "chrome://history2/";
70 const char kChromeUIHistoryURL[] = "chrome://history/"; 70 const char kChromeUIHistoryURL[] = "chrome://history/";
71 const char kChromeUIIPCURL[] = "chrome://about/ipc"; 71 const char kChromeUIIPCURL[] = "chrome://about/ipc/";
72 const char kChromeUIKeyboardURL[] = "chrome://keyboard/"; 72 const char kChromeUIKeyboardURL[] = "chrome://keyboard/";
73 const char kChromeUINewTabURL[] = "chrome://newtab"; 73 const char kChromeUINewTabURL[] = "chrome://newtab/";
74 const char kChromeUIPluginsURL[] = "chrome://plugins/"; 74 const char kChromeUIPluginsURL[] = "chrome://plugins/";
75 const char kChromeUIPrintURL[] = "chrome://print/"; 75 const char kChromeUIPrintURL[] = "chrome://print/";
76 const char kChromeUISettingsURL[] = "chrome://settings/"; 76 const char kChromeUISettingsURL[] = "chrome://settings/";
77 const char kChromeUITextfieldsURL[] = "chrome://textfields/"; 77 const char kChromeUITextfieldsURL[] = "chrome://textfields/";
78 78
79 #if defined(OS_CHROMEOS) 79 #if defined(OS_CHROMEOS)
80 const char kChromeUIAboutOSCreditsURL[] = "chrome://about/os-credits"; 80 const char kChromeUIAboutOSCreditsURL[] = "chrome://about/os-credits/";
81 const char kChromeUIActivationMessage[] = "chrome://activationmessage/"; 81 const char kChromeUIActivationMessage[] = "chrome://activationmessage/";
82 const char kChromeUIActiveDownloadsURL[] = "chrome://active-downloads/"; 82 const char kChromeUIActiveDownloadsURL[] = "chrome://active-downloads/";
83 const char kChromeUIChooseMobileNetworkURL[] = 83 const char kChromeUIChooseMobileNetworkURL[] =
84 "chrome://choose-mobile-network/"; 84 "chrome://choose-mobile-network/";
85 const char kChromeUICollectedCookiesURL[] = "chrome://collected-cookies/"; 85 const char kChromeUICollectedCookiesURL[] = "chrome://collected-cookies/";
86 const char kChromeUIHttpAuthURL[] = "chrome://http-auth/"; 86 const char kChromeUIHttpAuthURL[] = "chrome://http-auth/";
87 const char kChromeUIImageBurnerURL[] = "chrome://imageburner/"; 87 const char kChromeUIImageBurnerURL[] = "chrome://imageburner/";
88 const char kChromeUIKeyboardOverlayURL[] = "chrome://keyboardoverlay/"; 88 const char kChromeUIKeyboardOverlayURL[] = "chrome://keyboardoverlay/";
89 const char kChromeUIMediaplayerURL[] = "chrome://mediaplayer/"; 89 const char kChromeUIMediaplayerURL[] = "chrome://mediaplayer/";
90 const char kChromeUIMobileSetupURL[] = "chrome://mobilesetup/"; 90 const char kChromeUIMobileSetupURL[] = "chrome://mobilesetup/";
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 const char kNetworkViewInternalsURL[] = "chrome://net-internals/"; 167 const char kNetworkViewInternalsURL[] = "chrome://net-internals/";
168 const char kNetworkViewCacheURL[] = "chrome://view-http-cache/"; 168 const char kNetworkViewCacheURL[] = "chrome://view-http-cache/";
169 169
170 const char kSyncViewInternalsURL[] = "chrome://sync-internals/"; 170 const char kSyncViewInternalsURL[] = "chrome://sync-internals/";
171 171
172 // GPU sub pages 172 // GPU sub pages
173 const char kGpuInternalsURL[] = "chrome://gpu-internals/"; 173 const char kGpuInternalsURL[] = "chrome://gpu-internals/";
174 174
175 // Option sub pages. 175 // Option sub pages.
176 const char kAdvancedOptionsSubPage[] = "advanced"; 176 const char kAdvancedOptionsSubPage[] = "advanced";
177 const char kAutofillSubPage[] = "autofill"; 177 const char kAutofillSubPage[] = "autofill";
178 const char kBrowserOptionsSubPage[] = "browser"; 178 const char kBrowserOptionsSubPage[] = "browser";
179 const char kClearBrowserDataSubPage[] = "clearBrowserData"; 179 const char kClearBrowserDataSubPage[] = "clearBrowserData";
180 const char kContentSettingsSubPage[] = "content"; 180 const char kContentSettingsSubPage[] = "content";
181 const char kContentSettingsExceptionsSubPage[] = "contentExceptions"; 181 const char kContentSettingsExceptionsSubPage[] = "contentExceptions";
182 const char kDefaultOptionsSubPage[] = "";
183 const char kImportDataSubPage[] = "importData"; 182 const char kImportDataSubPage[] = "importData";
184 const char kInstantConfirmPage[] = "instantConfirm"; 183 const char kInstantConfirmPage[] = "instantConfirm";
185 const char kLanguageOptionsSubPage[] = "languages"; 184 const char kLanguageOptionsSubPage[] = "languages";
186 const char kPersonalOptionsSubPage[] = "personal"; 185 const char kPersonalOptionsSubPage[] = "personal";
187 const char kPasswordManagerSubPage[] = "passwords"; 186 const char kPasswordManagerSubPage[] = "passwords";
188 const char kSearchEnginesSubPage[] = "searchEngines"; 187 const char kSearchEnginesSubPage[] = "searchEngines";
189 const char kSyncSetupSubPage[] = "syncSetup"; 188 const char kSyncSetupSubPage[] = "syncSetup";
190 #if defined(OS_CHROMEOS) 189 #if defined(OS_CHROMEOS)
191 const char kInternetOptionsSubPage[] = "internet"; 190 const char kInternetOptionsSubPage[] = "internet";
192 const char kSystemOptionsSubPage[] = "system"; 191 const char kSystemOptionsSubPage[] = "system";
193 #endif 192 #endif
194 193
195 const char kPasswordManagerLearnMoreURL[] = 194 const char kPasswordManagerLearnMoreURL[] =
196 #if defined(OS_CHROMEOS) 195 #if defined(OS_CHROMEOS)
197 "https://www.google.com/support/chromeos/bin/answer.py?answer=95606"; 196 "https://www.google.com/support/chromeos/bin/answer.py?answer=95606";
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 259
261 // Prevent future modification of the standard schemes list. This is to 260 // Prevent future modification of the standard schemes list. This is to
262 // prevent accidental creation of data races in the program. AddStandardScheme 261 // prevent accidental creation of data races in the program. AddStandardScheme
263 // isn't threadsafe so must be called when GURL isn't used on any other 262 // isn't threadsafe so must be called when GURL isn't used on any other
264 // thread. This is really easy to mess up, so we say that all calls to 263 // thread. This is really easy to mess up, so we say that all calls to
265 // AddStandardScheme in Chrome must be inside this function. 264 // AddStandardScheme in Chrome must be inside this function.
266 url_util::LockStandardSchemes(); 265 url_util::LockStandardSchemes();
267 } 266 }
268 267
269 } // namespace chrome 268 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/url_constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698