Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/extensions/crx_installer.cc

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Master merge; moved class declaration Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 ->IsExtensionBlacklisted(extension_->id())) { 399 ->IsExtensionBlacklisted(extension_->id())) {
400 VLOG(1) << "This extension: " << extension_->id() 400 VLOG(1) << "This extension: " << extension_->id()
401 << " is blacklisted. Install failed."; 401 << " is blacklisted. Install failed.";
402 ReportFailureFromUIThread( 402 ReportFailureFromUIThread(
403 CrxInstallerError( 403 CrxInstallerError(
404 l10n_util::GetStringUTF16(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED))); 404 l10n_util::GetStringUTF16(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED)));
405 return; 405 return;
406 } 406 }
407 407
408 string16 error; 408 string16 error;
409 if (!ExtensionSystem::Get(profile_)->management_policy()->UserMayLoad( 409 if (!extensions::ExtensionSystem::Get(profile_)->management_policy()->
410 extension_, &error)) { 410 UserMayLoad(extension_, &error)) {
411 ReportFailureFromUIThread(CrxInstallerError(error)); 411 ReportFailureFromUIThread(CrxInstallerError(error));
412 return; 412 return;
413 } 413 }
414 414
415 GURL overlapping_url; 415 GURL overlapping_url;
416 const Extension* overlapping_extension = 416 const Extension* overlapping_extension =
417 frontend_weak_->extensions()-> 417 frontend_weak_->extensions()->
418 GetHostedAppByOverlappingWebExtent(extension_->web_extent()); 418 GetHostedAppByOverlappingWebExtent(extension_->web_extent());
419 if (overlapping_extension && 419 if (overlapping_extension &&
420 overlapping_extension->id() != extension_->id()) { 420 overlapping_extension->id() != extension_->id()) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 // Some users (such as the download shelf) need to know when a 617 // Some users (such as the download shelf) need to know when a
618 // CRXInstaller is done. Listening for the EXTENSION_* events 618 // CRXInstaller is done. Listening for the EXTENSION_* events
619 // is problematic because they don't know anything about the 619 // is problematic because they don't know anything about the
620 // extension before it is unpacked, so they cannot filter based 620 // extension before it is unpacked, so they cannot filter based
621 // on the extension. 621 // on the extension.
622 content::NotificationService::current()->Notify( 622 content::NotificationService::current()->Notify(
623 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 623 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
624 content::Source<CrxInstaller>(this), 624 content::Source<CrxInstaller>(this),
625 content::Details<const Extension>(extension)); 625 content::Details<const Extension>(extension));
626 } 626 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698