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

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

Issue 10630021: Modify experimental identity flow to display scope descriptions and details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 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
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 17b919b1a02cef3074bb908945391aaf9687c91a..239e693d361279871a6377a326c1d99b8c7d2e3a 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -99,7 +99,8 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak,
install_cause_(extension_misc::INSTALL_CAUSE_UNSET),
creation_flags_(Extension::NO_FLAGS),
off_store_install_allow_reason_(OffStoreInstallDisallowed),
- did_handle_successfully_(true) {
+ did_handle_successfully_(true),
+ record_oauth2_grant_(false) {
if (!approval)
return;
@@ -114,6 +115,7 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> frontend_weak,
approved_ = true;
expected_manifest_.reset(approval->parsed_manifest->DeepCopy());
expected_id_ = approval->extension_id;
+ record_oauth2_grant_ = approval->record_oauth2_grant;
}
}
@@ -587,12 +589,15 @@ void CrxInstaller::ReportSuccessFromUIThread() {
client_->OnInstallSuccess(extension_.get(), install_icon_.get());
}
+ if (client_ && !approved_)
+ record_oauth2_grant_ = client_->record_oauth2_grant();
+
// We update the extension's granted permissions if the user already approved
// the install (client_ is non NULL), or we are allowed to install this
// silently.
if (client_ || allow_silent_install_) {
PermissionsUpdater perms_updater(profile());
- perms_updater.GrantActivePermissions(extension_);
+ perms_updater.GrantActivePermissions(extension_, record_oauth2_grant_);
}
// Tell the frontend about the installation and hand off ownership of
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698