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

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

Issue 156843004: Remove ExtensionService::extension_prefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: additional cleanup Created 6 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/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index ac4d1d7859d54d6d9eb060302f1d58ee2113e37c..5dd3614ab8c637d477237e6e2f15611d9e90feef 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -14,11 +14,13 @@
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/permissions_updater.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/plugins/plugins_handler.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_l10n_util.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_prefs.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/id_util.h"
#include "extensions/common/manifest.h"
@@ -157,11 +159,11 @@ void UnpackedInstaller::ShowInstallPrompt() {
if (!service_weak_.get())
return;
- const ExtensionSet* disabled_extensions =
- service_weak_->disabled_extensions();
+ const ExtensionSet& disabled_extensions =
+ ExtensionRegistry::Get(service_weak_->profile())->disabled_extensions();
if (service_weak_->show_extensions_prompts() && prompt_for_plugins_ &&
PluginInfo::HasPlugins(installer_.extension().get()) &&
- !disabled_extensions->Contains(installer_.extension()->id())) {
+ !disabled_extensions.Contains(installer_.extension()->id())) {
SimpleExtensionLoadPrompt* prompt = new SimpleExtensionLoadPrompt(
installer_.extension().get(),
installer_.profile(),
@@ -193,7 +195,7 @@ int UnpackedInstaller::GetFlags() {
std::string id = id_util::GenerateIdForPath(extension_path_);
bool allow_file_access =
Manifest::ShouldAlwaysAllowFileAccess(Manifest::UNPACKED);
- ExtensionPrefs* prefs = service_weak_->extension_prefs();
+ ExtensionPrefs* prefs = ExtensionPrefs::Get(service_weak_->profile());
if (prefs->HasAllowFileAccessSetting(id))
allow_file_access = prefs->AllowFileAccess(id);
@@ -211,7 +213,7 @@ bool UnpackedInstaller::IsLoadingUnpackedAllowed() const {
return true;
// If there is a "*" in the extension blacklist, then no extensions should be
// allowed at all (except explicitly whitelisted extensions).
- ExtensionPrefs* prefs = service_weak_->extension_prefs();
+ ExtensionPrefs* prefs = ExtensionPrefs::Get(service_weak_->profile());
return !prefs->ExtensionsBlacklistedByDefault();
}

Powered by Google App Engine
This is Rietveld 408576698