OLD | NEW |
---|---|
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 Loading... | |
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(), |
nasko
2016/09/08 00:35:36
Does io_data->GetExtensionInfoMap()->extensions()
clamy
2016/09/09 15:06:41
I think so? I was planning on getting someone from
nasko
2016/09/09 23:30:27
I poked Devlin and his response was that only enab
clamy
2016/09/12 15:31:37
Ok. Went back to that.
| |
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 Loading... | |
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 |
OLD | NEW |