| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } else { | 292 } else { |
| 293 valid = expected_manifest_->Equals(original_manifest_.get()); | 293 valid = expected_manifest_->Equals(original_manifest_.get()); |
| 294 if (!valid && expected_manifest_check_level_ == | 294 if (!valid && expected_manifest_check_level_ == |
| 295 WebstoreInstaller::MANIFEST_CHECK_LEVEL_LOOSE) { | 295 WebstoreInstaller::MANIFEST_CHECK_LEVEL_LOOSE) { |
| 296 std::string error; | 296 std::string error; |
| 297 scoped_refptr<Extension> dummy_extension = | 297 scoped_refptr<Extension> dummy_extension = |
| 298 Extension::Create(base::FilePath(), | 298 Extension::Create(base::FilePath(), |
| 299 install_source_, | 299 install_source_, |
| 300 *expected_manifest_->value(), | 300 *expected_manifest_->value(), |
| 301 creation_flags_, | 301 creation_flags_, |
| 302 extension->id(), |
| 302 &error); | 303 &error); |
| 303 if (error.empty()) { | 304 if (error.empty()) { |
| 304 scoped_refptr<const PermissionSet> expected_permissions = | 305 scoped_refptr<const PermissionSet> expected_permissions = |
| 305 dummy_extension->permissions_data()->active_permissions(); | 306 dummy_extension->permissions_data()->active_permissions(); |
| 306 valid = !(PermissionMessageProvider::Get()->IsPrivilegeIncrease( | 307 valid = !(PermissionMessageProvider::Get()->IsPrivilegeIncrease( |
| 307 expected_permissions.get(), | 308 expected_permissions.get(), |
| 308 extension->permissions_data()->active_permissions().get(), | 309 extension->permissions_data()->active_permissions().get(), |
| 309 extension->GetType())); | 310 extension->GetType())); |
| 310 } | 311 } |
| 311 } | 312 } |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) | 914 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) |
| 914 return; | 915 return; |
| 915 | 916 |
| 916 if (client_) { | 917 if (client_) { |
| 917 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). | 918 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). |
| 918 client_->ConfirmReEnable(this, extension()); | 919 client_->ConfirmReEnable(this, extension()); |
| 919 } | 920 } |
| 920 } | 921 } |
| 921 | 922 |
| 922 } // namespace extensions | 923 } // namespace extensions |
| OLD | NEW |