| 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 "content/browser/browsing_instance.h" | 5 #include "content/browser/browsing_instance.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/browser/browser_context.h" | 9 #include "content/browser/browser_context.h" |
| 10 #include "content/browser/content_browser_client.h" | 10 #include "content/browser/content_browser_client.h" |
| 11 #include "content/browser/site_instance.h" | 11 #include "content/browser/site_instance.h" |
| 12 #include "content/browser/webui/web_ui_factory.h" | 12 #include "content/browser/webui/web_ui_factory.h" |
| 13 #include "content/common/content_client.h" | |
| 14 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
| 15 #include "content/public/common/url_constants.h" | 14 #include "content/public/common/url_constants.h" |
| 16 | 15 |
| 17 // static | 16 // static |
| 18 BrowsingInstance::ContextSiteInstanceMap | 17 BrowsingInstance::ContextSiteInstanceMap |
| 19 BrowsingInstance::context_site_instance_map_; | 18 BrowsingInstance::context_site_instance_map_; |
| 20 | 19 |
| 21 BrowsingInstance::BrowsingInstance(content::BrowserContext* browser_context) | 20 BrowsingInstance::BrowsingInstance(content::BrowserContext* browser_context) |
| 22 : browser_context_(browser_context) { | 21 : browser_context_(browser_context) { |
| 23 } | 22 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return true; | 143 return true; |
| 145 } | 144 } |
| 146 return false; | 145 return false; |
| 147 } | 146 } |
| 148 | 147 |
| 149 BrowsingInstance::~BrowsingInstance() { | 148 BrowsingInstance::~BrowsingInstance() { |
| 150 // We should only be deleted when all of the SiteInstances that refer to | 149 // We should only be deleted when all of the SiteInstances that refer to |
| 151 // us are gone. | 150 // us are gone. |
| 152 DCHECK(site_instance_map_.empty()); | 151 DCHECK(site_instance_map_.empty()); |
| 153 } | 152 } |
| OLD | NEW |