OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 if (frontend_weak_->extension_prefs() | 369 if (frontend_weak_->extension_prefs() |
370 ->IsExtensionBlacklisted(extension_->id())) { | 370 ->IsExtensionBlacklisted(extension_->id())) { |
371 VLOG(1) << "This extension: " << extension_->id() | 371 VLOG(1) << "This extension: " << extension_->id() |
372 << " is blacklisted. Install failed."; | 372 << " is blacklisted. Install failed."; |
373 ReportFailureFromUIThread( | 373 ReportFailureFromUIThread( |
374 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED)); | 374 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED)); |
375 return; | 375 return; |
376 } | 376 } |
377 | 377 |
378 if (!frontend_weak_->extension_prefs()->IsExtensionAllowedByPolicy( | 378 if (!frontend_weak_->extension_prefs()->IsExtensionAllowedByPolicy( |
379 extension_->id())) { | 379 extension_->id(), install_source_)) { |
380 ReportFailureFromUIThread( | 380 ReportFailureFromUIThread( |
381 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_POLICY_BLACKLIST)); | 381 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_POLICY_BLACKLIST)); |
382 return; | 382 return; |
383 } | 383 } |
384 | 384 |
385 GURL overlapping_url; | 385 GURL overlapping_url; |
386 const Extension* overlapping_extension = | 386 const Extension* overlapping_extension = |
387 frontend_weak_-> | 387 frontend_weak_-> |
388 GetExtensionByOverlappingWebExtent(extension_->web_extent()); | 388 GetExtensionByOverlappingWebExtent(extension_->web_extent()); |
389 if (overlapping_extension && | 389 if (overlapping_extension && |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 // Some users (such as the download shelf) need to know when a | 594 // Some users (such as the download shelf) need to know when a |
595 // CRXInstaller is done. Listening for the EXTENSION_* events | 595 // CRXInstaller is done. Listening for the EXTENSION_* events |
596 // is problematic because they don't know anything about the | 596 // is problematic because they don't know anything about the |
597 // extension before it is unpacked, so they can not filter based | 597 // extension before it is unpacked, so they can not filter based |
598 // on the extension. | 598 // on the extension. |
599 content::NotificationService::current()->Notify( | 599 content::NotificationService::current()->Notify( |
600 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 600 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
601 content::Source<CrxInstaller>(this), | 601 content::Source<CrxInstaller>(this), |
602 content::NotificationService::NoDetails()); | 602 content::NotificationService::NoDetails()); |
603 } | 603 } |
OLD | NEW |