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

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