| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/extension_process_manager.h" | 5 #include "chrome/browser/extensions/extension_process_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 } else { | 849 } else { |
| 850 // Do nothing. If an extension is spanning, then its original-profile | 850 // Do nothing. If an extension is spanning, then its original-profile |
| 851 // background page is shared with incognito, so we don't create another. | 851 // background page is shared with incognito, so we don't create another. |
| 852 } | 852 } |
| 853 } | 853 } |
| 854 | 854 |
| 855 SiteInstance* IncognitoExtensionProcessManager::GetSiteInstanceForURL( | 855 SiteInstance* IncognitoExtensionProcessManager::GetSiteInstanceForURL( |
| 856 const GURL& url) { | 856 const GURL& url) { |
| 857 ExtensionService* service = GetProfile()->GetExtensionService(); | 857 ExtensionService* service = GetProfile()->GetExtensionService(); |
| 858 if (service) { | 858 if (service) { |
| 859 const Extension* extension = service->extensions()->GetExtensionOrAppByURL( | 859 const Extension* extension = |
| 860 ExtensionURLInfo(url)); | 860 service->extensions()->GetExtensionOrAppByURL(url); |
| 861 if (extension && | 861 if (extension && |
| 862 !extensions::IncognitoInfo::IsSplitMode(extension)) { | 862 !extensions::IncognitoInfo::IsSplitMode(extension)) { |
| 863 return original_manager_->GetSiteInstanceForURL(url); | 863 return original_manager_->GetSiteInstanceForURL(url); |
| 864 } | 864 } |
| 865 } | 865 } |
| 866 return ExtensionProcessManager::GetSiteInstanceForURL(url); | 866 return ExtensionProcessManager::GetSiteInstanceForURL(url); |
| 867 } | 867 } |
| 868 | 868 |
| 869 bool IncognitoExtensionProcessManager::IsIncognitoEnabled( | 869 bool IncognitoExtensionProcessManager::IsIncognitoEnabled( |
| 870 const Extension* extension) { | 870 const Extension* extension) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 893 if (service && service->is_ready()) | 893 if (service && service->is_ready()) |
| 894 CreateBackgroundHostsForProfileStartup(); | 894 CreateBackgroundHostsForProfileStartup(); |
| 895 } | 895 } |
| 896 break; | 896 break; |
| 897 } | 897 } |
| 898 default: | 898 default: |
| 899 ExtensionProcessManager::Observe(type, source, details); | 899 ExtensionProcessManager::Observe(type, source, details); |
| 900 break; | 900 break; |
| 901 } | 901 } |
| 902 } | 902 } |
| OLD | NEW |