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