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

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

Issue 2394343002: Removing ShouldSwapProcessesForRedirect (using DoesSiteRequireDedicatedProcess).
Patch Set: Rebasing... Created 3 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome_content_browser_client_extensions_par t.h" 5 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par t.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 !process_map->Contains(new_extension->id(), 500 !process_map->Contains(new_extension->id(),
501 site_instance->GetProcess()->GetID())) 501 site_instance->GetProcess()->GetID()))
502 return true; 502 return true;
503 503
504 // Otherwise, swap BrowsingInstances when transitioning to/from Chrome Web 504 // Otherwise, swap BrowsingInstances when transitioning to/from Chrome Web
505 // Store. 505 // Store.
506 return is_current_url_for_web_store != is_new_url_for_web_store; 506 return is_current_url_for_web_store != is_new_url_for_web_store;
507 } 507 }
508 508
509 // static 509 // static
510 bool ChromeContentBrowserClientExtensionsPart::ShouldSwapProcessesForRedirect(
511 content::BrowserContext* browser_context,
512 const GURL& current_url,
513 const GURL& new_url) {
514 return CrossesExtensionProcessBoundary(
515 ExtensionRegistry::Get(browser_context)->enabled_extensions(),
516 current_url, new_url, false);
517 }
518
519 // static
520 bool ChromeContentBrowserClientExtensionsPart::AllowServiceWorker( 510 bool ChromeContentBrowserClientExtensionsPart::AllowServiceWorker(
521 const GURL& scope, 511 const GURL& scope,
522 const GURL& first_party_url, 512 const GURL& first_party_url,
523 content::ResourceContext* context) { 513 content::ResourceContext* context) {
524 // We only care about extension urls. 514 // We only care about extension urls.
525 if (!first_party_url.SchemeIs(kExtensionScheme)) 515 if (!first_party_url.SchemeIs(kExtensionScheme))
526 return true; 516 return true;
527 517
528 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 518 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
529 InfoMap* extension_info_map = io_data->GetExtensionInfoMap(); 519 InfoMap* extension_info_map = io_data->GetExtensionInfoMap();
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 command_line->AppendSwitch(switches::kExtensionProcess); 870 command_line->AppendSwitch(switches::kExtensionProcess);
881 } 871 }
882 } 872 }
883 873
884 void ChromeContentBrowserClientExtensionsPart::ResourceDispatcherHostCreated() { 874 void ChromeContentBrowserClientExtensionsPart::ResourceDispatcherHostCreated() {
885 content::ResourceDispatcherHost::Get()->RegisterInterceptor( 875 content::ResourceDispatcherHost::Get()->RegisterInterceptor(
886 "Origin", kExtensionScheme, base::Bind(&OnHttpHeaderReceived)); 876 "Origin", kExtensionScheme, base::Bind(&OnHttpHeaderReceived));
887 } 877 }
888 878
889 } // namespace extensions 879 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698