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

Side by Side Diff: content/browser/site_instance.cc

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
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 "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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698