OLD | NEW |
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/browser/renderer_host/site_instance.h" | 5 #include "content/browser/site_instance.h" |
6 | 6 |
7 #include "chrome/browser/browsing_instance.h" | 7 #include "chrome/browser/browsing_instance.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/webui/web_ui_factory.h" |
9 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 10 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
10 #include "chrome/browser/webui/web_ui_factory.h" | |
11 #include "chrome/common/notification_service.h" | 11 #include "chrome/common/notification_service.h" |
12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
13 #include "net/base/registry_controlled_domain.h" | 13 #include "net/base/registry_controlled_domain.h" |
14 | 14 |
15 // We treat javascript:, about:crash, about:hang, and about:shorthang as the | 15 // We treat javascript:, about:crash, about:hang, and about:shorthang as the |
16 // same site as any URL since they are actually modifiers on existing pages. | 16 // same site as any URL since they are actually modifiers on existing pages. |
17 static bool IsURLSameAsAnySiteInstance(const GURL& url) { | 17 static bool IsURLSameAsAnySiteInstance(const GURL& url) { |
18 if (!url.is_valid()) | 18 if (!url.is_valid()) |
19 return false; | 19 return false; |
20 return url.SchemeIs(chrome::kJavaScriptScheme) || | 20 return url.SchemeIs(chrome::kJavaScriptScheme) || |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 227 } |
228 | 228 |
229 void SiteInstance::Observe(NotificationType type, | 229 void SiteInstance::Observe(NotificationType type, |
230 const NotificationSource& source, | 230 const NotificationSource& source, |
231 const NotificationDetails& details) { | 231 const NotificationDetails& details) { |
232 DCHECK(type == NotificationType::RENDERER_PROCESS_TERMINATED); | 232 DCHECK(type == NotificationType::RENDERER_PROCESS_TERMINATED); |
233 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); | 233 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); |
234 if (rph == process_) | 234 if (rph == process_) |
235 process_ = NULL; | 235 process_ = NULL; |
236 } | 236 } |
OLD | NEW |