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

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

Issue 2321543002: Merge CrossSiteResourceHandler and NavigationResourceThrottle (Closed)
Patch Set: Addressed nits Created 4 years, 2 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 new_extension->id(), site_instance->GetProcess()->GetID())) 449 new_extension->id(), site_instance->GetProcess()->GetID()))
450 return true; 450 return true;
451 451
452 // Otherwise, swap BrowsingInstances if current_extension and new_extension 452 // Otherwise, swap BrowsingInstances if current_extension and new_extension
453 // differ. 453 // differ.
454 return current_extension != new_extension; 454 return current_extension != new_extension;
455 } 455 }
456 456
457 // static 457 // static
458 bool ChromeContentBrowserClientExtensionsPart::ShouldSwapProcessesForRedirect( 458 bool ChromeContentBrowserClientExtensionsPart::ShouldSwapProcessesForRedirect(
459 content::ResourceContext* resource_context, 459 content::BrowserContext* browser_context,
460 const GURL& current_url, 460 const GURL& current_url,
461 const GURL& new_url) { 461 const GURL& new_url) {
462 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
463 return CrossesExtensionProcessBoundary( 462 return CrossesExtensionProcessBoundary(
464 io_data->GetExtensionInfoMap()->extensions(), 463 ExtensionRegistry::Get(browser_context)->enabled_extensions(),
465 current_url, new_url, false); 464 current_url, new_url, false);
466 } 465 }
467 466
468 // static 467 // static
469 bool ChromeContentBrowserClientExtensionsPart::AllowServiceWorker( 468 bool ChromeContentBrowserClientExtensionsPart::AllowServiceWorker(
470 const GURL& scope, 469 const GURL& scope,
471 const GURL& first_party_url, 470 const GURL& first_party_url,
472 content::ResourceContext* context, 471 content::ResourceContext* context,
473 int render_process_id, 472 int render_process_id,
474 int render_frame_id) { 473 int render_frame_id) {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 } 685 }
687 } 686 }
688 } 687 }
689 688
690 void ChromeContentBrowserClientExtensionsPart::ResourceDispatcherHostCreated() { 689 void ChromeContentBrowserClientExtensionsPart::ResourceDispatcherHostCreated() {
691 content::ResourceDispatcherHost::Get()->RegisterInterceptor( 690 content::ResourceDispatcherHost::Get()->RegisterInterceptor(
692 "Origin", kExtensionScheme, base::Bind(&OnHttpHeaderReceived)); 691 "Origin", kExtensionScheme, base::Bind(&OnHttpHeaderReceived));
693 } 692 }
694 693
695 } // namespace extensions 694 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698