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

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

Issue 8493017: Cleanup extension permissions module. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 3530d61d931c261535939593ffba046fac400caf..ae663034615218db4b6c71fbbda1cef4a5f29da1 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/extensions/default_apps_trial.h"
#include "chrome/browser/extensions/extension_error_reporter.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/permissions_updater.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_notification_types.h"
@@ -43,6 +44,7 @@
#include "ui/base/resource/resource_bundle.h"
using content::BrowserThread;
+using extensions::PermissionsUpdater;
namespace {
@@ -581,8 +583,10 @@ void CrxInstaller::ReportSuccessFromUIThread() {
// the install (client_ is non NULL), or we are allowed to install this
// silently. We only track granted permissions for INTERNAL extensions.
if ((client_ || allow_silent_install_) &&
- extension_->location() == Extension::INTERNAL)
- frontend_weak_->GrantPermissions(extension_);
+ extension_->location() == Extension::INTERNAL) {
+ PermissionsUpdater perms_updater(profile());
+ perms_updater.GrantActivePermissions(extension_);
+ }
// Tell the frontend about the installation and hand off ownership of
// extension_ to it.

Powered by Google App Engine
This is Rietveld 408576698