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

Unified Diff: chrome/browser/ui/location_bar/origin_chip_info.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc ('k') | chrome/browser/ui/media_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/location_bar/origin_chip_info.cc
diff --git a/chrome/browser/ui/location_bar/origin_chip_info.cc b/chrome/browser/ui/location_bar/origin_chip_info.cc
index 923ee68cf28a637145750bd28e31307fd37427de..633b13d2e106b1e64c9ece096b45ddf4db775797 100644
--- a/chrome/browser/ui/location_bar/origin_chip_info.cc
+++ b/chrome/browser/ui/location_bar/origin_chip_info.cc
@@ -9,7 +9,6 @@
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
@@ -22,7 +21,7 @@
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_icon_image.h"
-#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
#include "grit/components_strings.h"
@@ -123,8 +122,9 @@ bool OriginChipInfo::Update(const content::WebContents* web_contents,
if (displayed_url_.SchemeIs(extensions::kExtensionScheme)) {
const extensions::Extension* extension =
- extensions::ExtensionSystem::Get(profile_)->extension_service()->
- extensions()->GetExtensionOrAppByURL(displayed_url_);
+ extensions::ExtensionRegistry::Get(profile_)
+ ->enabled_extensions()
+ .GetByID(displayed_url_.host());
if (extension) {
icon_ = IDR_EXTENSIONS_FAVICON;
@@ -197,10 +197,10 @@ base::string16 OriginChip::LabelFromURLForProfile(const GURL& provided_url,
// For chrome-extension URLs, return the extension name.
if (url.SchemeIs(extensions::kExtensionScheme)) {
- ExtensionService* service =
- extensions::ExtensionSystem::Get(profile)->extension_service();
const extensions::Extension* extension =
- service->extensions()->GetExtensionOrAppByURL(url);
+ extensions::ExtensionRegistry::Get(profile)
+ ->enabled_extensions()
+ .GetByID(url.host());
return extension ?
base::UTF8ToUTF16(extension->name()) : base::UTF8ToUTF16(url.host());
}
« no previous file with comments | « chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc ('k') | chrome/browser/ui/media_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698