| Index: chrome/browser/extensions/api/app/app_api.cc
|
| diff --git a/chrome/browser/extensions/api/app/app_api.cc b/chrome/browser/extensions/api/app/app_api.cc
|
| index 139ba6abf35d8b9e3e4fce7cd190862099f5da04..3c0a584001a30abfd4848bc19a1f552fc767f3cf 100644
|
| --- a/chrome/browser/extensions/api/app/app_api.cc
|
| +++ b/chrome/browser/extensions/api/app/app_api.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/values.h"
|
| #include "chrome/browser/extensions/app_notification_manager.h"
|
| #include "chrome/browser/extensions/extension_service.h"
|
| +#include "chrome/browser/extensions/extension_system.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/extensions/extension_constants.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -43,7 +44,8 @@ bool AppNotifyFunction::RunImpl() {
|
| std::string id = extension_id();
|
| if (details->HasKey(kExtensionIdKey)) {
|
| EXTENSION_FUNCTION_VALIDATE(details->GetString(kExtensionIdKey, &id));
|
| - if (!profile()->GetExtensionService()->GetExtensionById(id, true)) {
|
| + if (!extensions::ExtensionSystem::Get(profile())->extension_service()->
|
| + GetExtensionById(id, true)) {
|
| error_ = kInvalidExtensionIdError;
|
| return false;
|
| }
|
| @@ -78,8 +80,8 @@ bool AppNotifyFunction::RunImpl() {
|
| item->set_link_text(link_text);
|
| }
|
|
|
| - AppNotificationManager* manager =
|
| - profile()->GetExtensionService()->app_notification_manager();
|
| + AppNotificationManager* manager = extensions::ExtensionSystem::Get(
|
| + profile())->extension_service()->app_notification_manager();
|
|
|
| // TODO(beaudoin) We should probably report an error if Add returns false.
|
| manager->Add(item.release());
|
| @@ -97,14 +99,15 @@ bool AppClearAllNotificationsFunction::RunImpl() {
|
| DictionaryValue* details = NULL;
|
| if (args_->GetDictionary(0, &details) && details->HasKey(kExtensionIdKey)) {
|
| EXTENSION_FUNCTION_VALIDATE(details->GetString(kExtensionIdKey, &id));
|
| - if (!profile()->GetExtensionService()->GetExtensionById(id, true)) {
|
| + if (!extensions::ExtensionSystem::Get(profile())->extension_service()->
|
| + GetExtensionById(id, true)) {
|
| error_ = kInvalidExtensionIdError;
|
| return false;
|
| }
|
| }
|
|
|
| - AppNotificationManager* manager =
|
| - profile()->GetExtensionService()->app_notification_manager();
|
| + AppNotificationManager* manager = extensions::ExtensionSystem::Get(
|
| + profile())->extension_service()->app_notification_manager();
|
| manager->ClearAll(id);
|
| return true;
|
| }
|
|
|