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

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 11312016: content: Move two more url constants into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | chrome/common/url_constants.cc » ('j') | 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) 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 "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/about_flags.h" 8 #include "chrome/browser/about_flags.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_web_ui.h" 10 #include "chrome/browser/extensions/extension_web_ui.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 return UseWebUIForURL(browser_context, url) || 450 return UseWebUIForURL(browser_context, url) ||
451 // javacsript: URLs are allowed to run in Web UI pages 451 // javacsript: URLs are allowed to run in Web UI pages
452 url.SchemeIs(chrome::kJavaScriptScheme) || 452 url.SchemeIs(chrome::kJavaScriptScheme) ||
453 // It's possible to load about:blank in a Web UI renderer. 453 // It's possible to load about:blank in a Web UI renderer.
454 // See http://crbug.com/42547 454 // See http://crbug.com/42547
455 url.spec() == chrome::kAboutBlankURL || 455 url.spec() == chrome::kAboutBlankURL ||
456 // Chrome URLs crash, kill, hang, and shorthang are allowed. 456 // Chrome URLs crash, kill, hang, and shorthang are allowed.
457 url == GURL(chrome::kChromeUICrashURL) || 457 url == GURL(chrome::kChromeUICrashURL) ||
458 url == GURL(chrome::kChromeUIKillURL) || 458 url == GURL(chrome::kChromeUIKillURL) ||
459 url == GURL(chrome::kChromeUIHangURL) || 459 url == GURL(chrome::kChromeUIHangURL) ||
460 url == GURL(chrome::kChromeUIShorthangURL) || 460 url == GURL(content::kChromeUIShorthangURL) ||
461 // Data URLs are usually not allowed in WebUI for security reasons. 461 // Data URLs are usually not allowed in WebUI for security reasons.
462 // BalloonHosts are one exception needed by ChromeOS, and are safe because 462 // BalloonHosts are one exception needed by ChromeOS, and are safe because
463 // they cannot be scripted by other pages. 463 // they cannot be scripted by other pages.
464 (data_urls_allowed && url.SchemeIs(chrome::kDataScheme)); 464 (data_urls_allowed && url.SchemeIs(chrome::kDataScheme));
465 } 465 }
466 466
467 WebUIController* ChromeWebUIControllerFactory::CreateWebUIControllerForURL( 467 WebUIController* ChromeWebUIControllerFactory::CreateWebUIControllerForURL(
468 WebUI* web_ui, 468 WebUI* web_ui,
469 const GURL& url) const { 469 const GURL& url) const {
470 Profile* profile = Profile::FromWebUI(web_ui); 470 Profile* profile = Profile::FromWebUI(web_ui);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 if (page_url.host() == chrome::kChromeUISettingsFrameHost) 593 if (page_url.host() == chrome::kChromeUISettingsFrameHost)
594 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); 594 return options::OptionsUI::GetFaviconResourceBytes(scale_factor);
595 595
596 // Android doesn't use the plugins pages. 596 // Android doesn't use the plugins pages.
597 if (page_url.host() == chrome::kChromeUIPluginsHost) 597 if (page_url.host() == chrome::kChromeUIPluginsHost)
598 return PluginsUI::GetFaviconResourceBytes(scale_factor); 598 return PluginsUI::GetFaviconResourceBytes(scale_factor);
599 #endif 599 #endif
600 600
601 return NULL; 601 return NULL;
602 } 602 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/url_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698