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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index c333ae151aa6a32210fe9126f7abc0a771ab99ba..301bcd7aaf8d9893766c9a227cae7e90f8255488 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -79,6 +79,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
@@ -2787,7 +2788,7 @@ ExtensionIdSet ExtensionService::GetAppIds() const {
}
bool ExtensionService::IsBackgroundPageReady(const Extension* extension) const {
- if (!extension->has_persistent_background_page())
+ if (!extensions::BackgroundInfo::HasPersistentBackgroundPage(extension))
return true;
ExtensionRuntimeDataMap::const_iterator it =
extension_runtime_data_.find(extension->id());
@@ -2796,7 +2797,7 @@ bool ExtensionService::IsBackgroundPageReady(const Extension* extension) const {
}
void ExtensionService::SetBackgroundPageReady(const Extension* extension) {
- DCHECK(extension->has_background_page());
+ DCHECK(extensions::BackgroundInfo::HasBackgroundPage(extension));
extension_runtime_data_[extension->id()].background_page_ready = true;
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
@@ -3028,7 +3029,7 @@ bool ExtensionService::ShouldDelayExtensionUpdate(
if (!old)
return false;
- if (old->has_persistent_background_page()) {
+ if (extensions::BackgroundInfo::HasPersistentBackgroundPage(old)) {
// Delay installation if the extension listens for the onUpdateAvailable
// event.
return system_->event_router()->ExtensionHasEventListener(
« no previous file with comments | « chrome/browser/extensions/extension_protocols_unittest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698