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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 31008: Coalesce more hardcoded schemes to using predefined constants. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_view_host.cc
===================================================================
--- chrome/browser/renderer_host/render_view_host.cc (revision 10346)
+++ chrome/browser/renderer_host/render_view_host.cc (working copy)
@@ -28,6 +28,7 @@
#include "chrome/common/resource_bundle.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
+#include "chrome/common/url_constants.h"
#include "chrome/common/thumbnail_score.h"
#include "net/base/net_util.h"
#include "skia/include/SkBitmap.h"
@@ -41,10 +42,10 @@
if (!url->is_valid())
return; // We don't need to block invalid URLs.
- if (url->SchemeIs("about")) {
+ if (url->SchemeIs(chrome::kAboutScheme)) {
// The renderer treats all URLs in the about: scheme as being about:blank.
// Canonicalize about: URLs to about:blank.
- *url = GURL("about:blank");
+ *url = GURL(chrome::kAboutBlankURL);
}
if (!policy->CanRequestURL(renderer_id, *url)) {
« no previous file with comments | « chrome/browser/renderer_host/buffered_resource_handler.cc ('k') | chrome/browser/renderer_host/renderer_security_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698