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

Unified Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper.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/media_utils.cc ('k') | chrome/browser/ui/views/location_bar/origin_chip_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index 98d68a13a5365cfd6247f2b4a6b0dfa385248169..ef5fbb42e6234828f7125e6ee1c6ed80b9a48f11 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -22,10 +22,9 @@
#include "ui/native_theme/native_theme.h"
#if defined(ENABLE_EXTENSIONS)
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/sync_helper.h"
-#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -204,21 +203,19 @@ bool HasBeenShutdown(Profile* profile) {
bool HasSyncedExtensions(Profile* profile) {
#if defined(ENABLE_EXTENSIONS)
- extensions::ExtensionSystem* system =
- extensions::ExtensionSystem::Get(profile);
- if (system && system->extension_service()) {
- const extensions::ExtensionSet* extensions =
- system->extension_service()->extensions();
- for (extensions::ExtensionSet::const_iterator iter = extensions->begin();
- iter != extensions->end(); ++iter) {
+ extensions::ExtensionRegistry* registry =
+ extensions::ExtensionRegistry::Get(profile);
+ if (registry) {
+ for (const scoped_refptr<const extensions::Extension>& extension :
+ registry->enabled_extensions()) {
// The webstore is synced so that it stays put on the new tab
// page, but since it's installed by default we don't want to
// consider it when determining if the profile is dirty.
- if (extensions::sync_helper::IsSyncable(iter->get()) &&
- (*iter)->id() != extensions::kWebStoreAppId &&
- (*iter)->id() != extension_misc::kChromeAppId) {
+ if (extensions::sync_helper::IsSyncable(extension.get()) &&
+ extension->id() != extensions::kWebStoreAppId &&
+ extension->id() != extension_misc::kChromeAppId) {
DVLOG(1) << "ProfileSigninConfirmationHelper: "
- << "profile contains a synced extension: " << (*iter)->id();
+ << "profile contains a synced extension: " << extension->id();
return true;
}
}
« no previous file with comments | « chrome/browser/ui/media_utils.cc ('k') | chrome/browser/ui/views/location_bar/origin_chip_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698