| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/browser/process_manager.h" | 5 #include "extensions/browser/process_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 // This increment / decrement is to simulate an instantaneous event. This | 612 // This increment / decrement is to simulate an instantaneous event. This |
| 613 // has the effect of invalidating close_sequence_id, preventing any in | 613 // has the effect of invalidating close_sequence_id, preventing any in |
| 614 // progress closes from completing and starting a new close process if | 614 // progress closes from completing and starting a new close process if |
| 615 // necessary. | 615 // necessary. |
| 616 IncrementLazyKeepaliveCount(extension); | 616 IncrementLazyKeepaliveCount(extension); |
| 617 DecrementLazyKeepaliveCount(extension); | 617 DecrementLazyKeepaliveCount(extension); |
| 618 } | 618 } |
| 619 } | 619 } |
| 620 | 620 |
| 621 void ProcessManager::CloseBackgroundHosts() { | 621 void ProcessManager::CloseBackgroundHosts() { |
| 622 STLDeleteElements(&background_hosts_); | 622 base::STLDeleteElements(&background_hosts_); |
| 623 } | 623 } |
| 624 | 624 |
| 625 void ProcessManager::SetKeepaliveImpulseCallbackForTesting( | 625 void ProcessManager::SetKeepaliveImpulseCallbackForTesting( |
| 626 const ImpulseCallbackForTesting& callback) { | 626 const ImpulseCallbackForTesting& callback) { |
| 627 keepalive_impulse_callback_for_testing_ = callback; | 627 keepalive_impulse_callback_for_testing_ = callback; |
| 628 } | 628 } |
| 629 | 629 |
| 630 void ProcessManager::SetKeepaliveImpulseDecrementCallbackForTesting( | 630 void ProcessManager::SetKeepaliveImpulseDecrementCallbackForTesting( |
| 631 const ImpulseCallbackForTesting& callback) { | 631 const ImpulseCallbackForTesting& callback) { |
| 632 keepalive_impulse_decrement_callback_for_testing_ = callback; | 632 keepalive_impulse_decrement_callback_for_testing_ = callback; |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 if (extension && !IncognitoInfo::IsSplitMode(extension)) { | 988 if (extension && !IncognitoInfo::IsSplitMode(extension)) { |
| 989 BrowserContext* original_context = | 989 BrowserContext* original_context = |
| 990 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); | 990 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); |
| 991 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); | 991 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); |
| 992 } | 992 } |
| 993 | 993 |
| 994 return ProcessManager::GetSiteInstanceForURL(url); | 994 return ProcessManager::GetSiteInstanceForURL(url); |
| 995 } | 995 } |
| 996 | 996 |
| 997 } // namespace extensions | 997 } // namespace extensions |
| OLD | NEW |