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

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: merge Created 8 years, 11 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/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 5e8dee04d39947b29c9037614be4ad56fd74e360..f904df075d9100c68337bf9f19c50fc23efbecfc 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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"
@@ -44,6 +45,7 @@
using content::BrowserThread;
using content::UserMetricsAction;
+using extensions::PermissionsUpdater;
namespace {
@@ -582,8 +584,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.
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | chrome/browser/extensions/extension_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698