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

Unified Diff: chrome/browser/notifications/notification_options_menu_model.cc

Issue 8827013: Move/replace/rename URL-based extension getters from ExtensionService to/in ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: origins Created 9 years 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/notifications/notification_options_menu_model.cc
diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc
index 0ccb66b7e5928f70de1bb5fb78eec310fbda804a..790cb25407946a27af2ab395abb6b6c1624a949d 100644
--- a/chrome/browser/notifications/notification_options_menu_model.cc
+++ b/chrome/browser/notifications/notification_options_menu_model.cc
@@ -119,7 +119,8 @@ NotificationOptionsMenuModel::NotificationOptionsMenuModel(Balloon* balloon)
if (origin.SchemeIs(chrome::kExtensionScheme)) {
ExtensionService* ext_service =
balloon_->profile()->GetExtensionService();
- const Extension* extension = ext_service->GetExtensionByURL(origin);
+ const Extension* extension =
+ ext_service->extensions()->GetByURL(ExtensionURLInfo(origin));
// We get back no extension here when we show the notification after
// the extension has crashed.
if (extension) {
@@ -167,7 +168,8 @@ string16 NotificationOptionsMenuModel::GetLabelForCommandId(int command_id)
if (origin.SchemeIs(chrome::kExtensionScheme)) {
ExtensionService* ext_service =
balloon_->profile()->GetExtensionService();
- const Extension* extension = ext_service->GetExtensionByURL(origin);
+ const Extension* extension =
+ ext_service->extensions()->GetByURL(ExtensionURLInfo(origin));
if (extension) {
return l10n_util::GetStringUTF16(
ext_service->IsExtensionEnabled(extension->id()) ?
@@ -223,7 +225,8 @@ void NotificationOptionsMenuModel::ExecuteCommand(int command_id) {
service->GrantPermission(origin);
break;
case kToggleExtensionCommand: {
- const Extension* extension = ext_service->GetExtensionByURL(origin);
+ const Extension* extension =
+ ext_service->extensions()->GetByURL(ExtensionURLInfo(origin));
if (extension) {
const std::string& id = extension->id();
if (ext_service->IsExtensionEnabled(id))

Powered by Google App Engine
This is Rietveld 408576698