| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 scoped_refptr<Extension> dummy_extension = | 300 scoped_refptr<Extension> dummy_extension = |
| 301 Extension::Create(base::FilePath(), | 301 Extension::Create(base::FilePath(), |
| 302 install_source_, | 302 install_source_, |
| 303 *expected_manifest_->value(), | 303 *expected_manifest_->value(), |
| 304 creation_flags_, | 304 creation_flags_, |
| 305 &error); | 305 &error); |
| 306 if (error.empty()) { | 306 if (error.empty()) { |
| 307 scoped_refptr<const PermissionSet> expected_permissions = | 307 scoped_refptr<const PermissionSet> expected_permissions = |
| 308 dummy_extension->permissions_data()->active_permissions(); | 308 dummy_extension->permissions_data()->active_permissions(); |
| 309 valid = !(PermissionMessageProvider::Get()->IsPrivilegeIncrease( | 309 valid = !(PermissionMessageProvider::Get()->IsPrivilegeIncrease( |
| 310 expected_permissions, | 310 expected_permissions.get(), |
| 311 extension->permissions_data()->active_permissions(), | 311 extension->permissions_data()->active_permissions(), |
| 312 extension->GetType())); | 312 extension->GetType())); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 | 316 |
| 317 if (!valid) | 317 if (!valid) |
| 318 return CrxInstallerError( | 318 return CrxInstallerError( |
| 319 l10n_util::GetStringUTF16(IDS_EXTENSION_MANIFEST_INVALID)); | 319 l10n_util::GetStringUTF16(IDS_EXTENSION_MANIFEST_INVALID)); |
| 320 } | 320 } |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) | 892 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) |
| 893 return; | 893 return; |
| 894 | 894 |
| 895 if (client_) { | 895 if (client_) { |
| 896 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). | 896 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). |
| 897 client_->ConfirmReEnable(this, extension()); | 897 client_->ConfirmReEnable(this, extension()); |
| 898 } | 898 } |
| 899 } | 899 } |
| 900 | 900 |
| 901 } // namespace extensions | 901 } // namespace extensions |
| OLD | NEW |