| 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1749 if (!did_show_alert) | 1749 if (!did_show_alert) |
| 1750 extension_error_ui_.reset(); | 1750 extension_error_ui_.reset(); |
| 1751 } | 1751 } |
| 1752 | 1752 |
| 1753 bool ExtensionService::PopulateExtensionErrorUI( | 1753 bool ExtensionService::PopulateExtensionErrorUI( |
| 1754 ExtensionErrorUI* extension_error_ui) { | 1754 ExtensionErrorUI* extension_error_ui) { |
| 1755 bool needs_alert = false; | 1755 bool needs_alert = false; |
| 1756 for (ExtensionSet::const_iterator iter = extensions_.begin(); | 1756 for (ExtensionSet::const_iterator iter = extensions_.begin(); |
| 1757 iter != extensions_.end(); ++iter) { | 1757 iter != extensions_.end(); ++iter) { |
| 1758 const Extension* e = *iter; | 1758 const Extension* e = *iter; |
| 1759 #if !defined(OS_CHROMEOS) |
| 1759 if (Extension::IsExternalLocation(e->location())) { | 1760 if (Extension::IsExternalLocation(e->location())) { |
| 1760 if (!e->is_hosted_app()) { | 1761 if (!e->is_hosted_app()) { |
| 1761 if (!extension_prefs_->IsExternalExtensionAcknowledged(e->id())) { | 1762 if (!extension_prefs_->IsExternalExtensionAcknowledged(e->id())) { |
| 1762 extension_error_ui->AddExternalExtension(e->id()); | 1763 extension_error_ui->AddExternalExtension(e->id()); |
| 1763 needs_alert = true; | 1764 needs_alert = true; |
| 1764 } | 1765 } |
| 1765 } | 1766 } |
| 1766 } | 1767 } |
| 1768 #endif |
| 1767 if (!extension_prefs_->UserMayLoad(e, NULL)) { | 1769 if (!extension_prefs_->UserMayLoad(e, NULL)) { |
| 1768 if (!extension_prefs_->IsBlacklistedExtensionAcknowledged(e->id())) { | 1770 if (!extension_prefs_->IsBlacklistedExtensionAcknowledged(e->id())) { |
| 1769 extension_error_ui->AddBlacklistedExtension(e->id()); | 1771 extension_error_ui->AddBlacklistedExtension(e->id()); |
| 1770 needs_alert = true; | 1772 needs_alert = true; |
| 1771 } | 1773 } |
| 1772 } | 1774 } |
| 1773 if (extension_prefs_->IsExtensionOrphaned(e->id())) { | 1775 if (extension_prefs_->IsExtensionOrphaned(e->id())) { |
| 1774 if (!extension_prefs_->IsOrphanedExtensionAcknowledged(e->id())) { | 1776 if (!extension_prefs_->IsOrphanedExtensionAcknowledged(e->id())) { |
| 1775 extension_error_ui->AddOrphanedExtension(e->id()); | 1777 extension_error_ui->AddOrphanedExtension(e->id()); |
| 1776 needs_alert = true; | 1778 needs_alert = true; |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 extensions::ExtensionHost* extension_host) { | 2649 extensions::ExtensionHost* extension_host) { |
| 2648 if (!extension_host) | 2650 if (!extension_host) |
| 2649 return; | 2651 return; |
| 2650 | 2652 |
| 2651 #if !defined(OS_ANDROID) | 2653 #if !defined(OS_ANDROID) |
| 2652 extensions::LaunchPlatformApp(extension_host->profile(), | 2654 extensions::LaunchPlatformApp(extension_host->profile(), |
| 2653 extension_host->extension(), | 2655 extension_host->extension(), |
| 2654 NULL, FilePath()); | 2656 NULL, FilePath()); |
| 2655 #endif | 2657 #endif |
| 2656 } | 2658 } |
| OLD | NEW |