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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 384 |
385 if (!frontend_weak_->extension_prefs()->IsExtensionAllowedByPolicy( | 385 if (!frontend_weak_->extension_prefs()->IsExtensionAllowedByPolicy( |
386 extension_->id(), install_source_)) { | 386 extension_->id(), install_source_)) { |
387 ReportFailureFromUIThread( | 387 ReportFailureFromUIThread( |
388 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_POLICY_BLACKLIST)); | 388 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_POLICY_BLACKLIST)); |
389 return; | 389 return; |
390 } | 390 } |
391 | 391 |
392 GURL overlapping_url; | 392 GURL overlapping_url; |
393 const Extension* overlapping_extension = | 393 const Extension* overlapping_extension = |
394 frontend_weak_-> | 394 frontend_weak_->extensions()-> |
395 GetExtensionByOverlappingWebExtent(extension_->web_extent()); | 395 GetHostedAppByOverlappingWebExtent(extension_->web_extent()); |
396 if (overlapping_extension && | 396 if (overlapping_extension && |
397 overlapping_extension->id() != extension_->id()) { | 397 overlapping_extension->id() != extension_->id()) { |
398 ReportFailureFromUIThread(l10n_util::GetStringFUTF8( | 398 ReportFailureFromUIThread(l10n_util::GetStringFUTF8( |
399 IDS_EXTENSION_OVERLAPPING_WEB_EXTENT, | 399 IDS_EXTENSION_OVERLAPPING_WEB_EXTENT, |
400 UTF8ToUTF16(overlapping_extension->name()))); | 400 UTF8ToUTF16(overlapping_extension->name()))); |
401 return; | 401 return; |
402 } | 402 } |
403 | 403 |
404 current_version_ = | 404 current_version_ = |
405 frontend_weak_->extension_prefs()->GetVersionString(extension_->id()); | 405 frontend_weak_->extension_prefs()->GetVersionString(extension_->id()); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 // Some users (such as the download shelf) need to know when a | 601 // Some users (such as the download shelf) need to know when a |
602 // CRXInstaller is done. Listening for the EXTENSION_* events | 602 // CRXInstaller is done. Listening for the EXTENSION_* events |
603 // is problematic because they don't know anything about the | 603 // is problematic because they don't know anything about the |
604 // extension before it is unpacked, so they cannot filter based | 604 // extension before it is unpacked, so they cannot filter based |
605 // on the extension. | 605 // on the extension. |
606 content::NotificationService::current()->Notify( | 606 content::NotificationService::current()->Notify( |
607 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 607 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
608 content::Source<CrxInstaller>(this), | 608 content::Source<CrxInstaller>(this), |
609 content::Details<const Extension>(extension)); | 609 content::Details<const Extension>(extension)); |
610 } | 610 } |
OLD | NEW |