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

Unified Diff: content/browser/site_instance.cc

Issue 7044013: Drop url_constants dependency in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reinsert 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/site_instance.cc
diff --git a/content/browser/site_instance.cc b/content/browser/site_instance.cc
index ed8cd9b7bedc371198ac2fb03d29c17ae6b1641e..f96e3b2a6d7671d4e1e5d0d85e0a74fcf432a6c6 100644
--- a/content/browser/site_instance.cc
+++ b/content/browser/site_instance.cc
@@ -4,25 +4,28 @@
#include "content/browser/site_instance.h"
-#include "chrome/common/url_constants.h"
#include "content/browser/browsing_instance.h"
#include "content/browser/content_browser_client.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/webui/web_ui_factory.h"
-#include "content/common/notification_service.h"
#include "content/common/content_client.h"
+#include "content/common/notification_service.h"
+#include "content/common/url_constants.h"
#include "net/base/registry_controlled_domain.h"
-// We treat javascript:, about:crash, about:hang, and about:shorthang as the
-// same site as any URL since they are actually modifiers on existing pages.
static bool IsURLSameAsAnySiteInstance(const GURL& url) {
if (!url.is_valid())
return false;
- return url.SchemeIs(chrome::kJavaScriptScheme) ||
- url.spec() == chrome::kAboutCrashURL ||
- url.spec() == chrome::kAboutKillURL ||
- url.spec() == chrome::kAboutHangURL ||
- url.spec() == chrome::kAboutShorthangURL;
+
+ // We treat javascript: and about:crash as the same site as any URL since they
+ // are actually modifiers on existing pages.
+ if (url.SchemeIs(chrome::kJavaScriptScheme) ||
+ url.spec() == chrome::kAboutCrashURL) {
+ return true;
+ }
+
+ return
+ content::GetContentClient()->browser()->IsURLSameAsAnySiteInstance(url);
}
int32 SiteInstance::next_site_instance_id_ = 1;
« no previous file with comments | « content/browser/renderer_host/x509_user_cert_resource_handler.cc ('k') | content/browser/site_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698