| OLD | NEW |
| 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_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 extension_runtime_data_[extension->id()].background_page_ready = true; | 2570 extension_runtime_data_[extension->id()].background_page_ready = true; |
| 2571 content::NotificationService::current()->Notify( | 2571 content::NotificationService::current()->Notify( |
| 2572 chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY, | 2572 chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY, |
| 2573 content::Source<const Extension>(extension), | 2573 content::Source<const Extension>(extension), |
| 2574 content::NotificationService::NoDetails()); | 2574 content::NotificationService::NoDetails()); |
| 2575 } | 2575 } |
| 2576 | 2576 |
| 2577 void ExtensionService::InspectBackgroundPage(const Extension* extension) { | 2577 void ExtensionService::InspectBackgroundPage(const Extension* extension) { |
| 2578 DCHECK(extension); | 2578 DCHECK(extension); |
| 2579 | 2579 |
| 2580 ExtensionProcessManager* pm = profile_->GetExtensionProcessManager(); | 2580 ExtensionProcessManager* pm = |
| 2581 extensions::ExtensionSystem::Get(profile_)->process_manager(); |
| 2581 extensions::LazyBackgroundTaskQueue* queue = | 2582 extensions::LazyBackgroundTaskQueue* queue = |
| 2582 extensions::ExtensionSystem::Get(profile_)->lazy_background_task_queue(); | 2583 extensions::ExtensionSystem::Get(profile_)->lazy_background_task_queue(); |
| 2583 | 2584 |
| 2584 extensions::ExtensionHost* host = | 2585 extensions::ExtensionHost* host = |
| 2585 pm->GetBackgroundHostForExtension(extension->id()); | 2586 pm->GetBackgroundHostForExtension(extension->id()); |
| 2586 if (host) { | 2587 if (host) { |
| 2587 InspectExtensionHost(host); | 2588 InspectExtensionHost(host); |
| 2588 } else { | 2589 } else { |
| 2589 queue->AddPendingTask( | 2590 queue->AddPendingTask( |
| 2590 profile_, extension->id(), | 2591 profile_, extension->id(), |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 // enabling them. | 2742 // enabling them. |
| 2742 if (Extension::IsExternalLocation(extension->location()) && | 2743 if (Extension::IsExternalLocation(extension->location()) && |
| 2743 !extension_prefs_->IsExternalExtensionAcknowledged(extension->id())) { | 2744 !extension_prefs_->IsExternalExtensionAcknowledged(extension->id())) { |
| 2744 return false; | 2745 return false; |
| 2745 } | 2746 } |
| 2746 } | 2747 } |
| 2747 #endif | 2748 #endif |
| 2748 | 2749 |
| 2749 return true; | 2750 return true; |
| 2750 } | 2751 } |
| OLD | NEW |