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

Side by Side Diff: chrome/browser/extensions/extension_process_manager.cc

Issue 16625012: Remove ExtensionURLInfo, make security decisions in render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address feedback Created 7 years, 5 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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_info_map_unittest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698