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

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

Issue 10854009: Extension white and force lists (set by policy) should have priority over auto-updated Google black… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed loop_.RunAllPending(); Created 8 years, 4 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 BrowserThread::UI, FROM_HERE, 388 BrowserThread::UI, FROM_HERE,
389 base::Bind(&CrxInstaller::ConfirmInstall, this))) 389 base::Bind(&CrxInstaller::ConfirmInstall, this)))
390 NOTREACHED(); 390 NOTREACHED();
391 } 391 }
392 392
393 void CrxInstaller::ConfirmInstall() { 393 void CrxInstaller::ConfirmInstall() {
394 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 394 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
395 if (!frontend_weak_.get()) 395 if (!frontend_weak_.get())
396 return; 396 return;
397 397
398 if (frontend_weak_->extension_prefs()
399 ->IsExtensionBlacklisted(extension_->id())) {
400 VLOG(1) << "This extension: " << extension_->id()
401 << " is blacklisted. Install failed.";
402 ReportFailureFromUIThread(
403 CrxInstallerError(
404 l10n_util::GetStringUTF16(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED)));
405 return;
406 }
407
408 string16 error; 398 string16 error;
409 if (!ExtensionSystem::Get(profile_)->management_policy()-> 399 if (!ExtensionSystem::Get(profile_)->management_policy()->
410 UserMayLoad(extension_, &error)) { 400 UserMayLoad(extension_, &error)) {
411 ReportFailureFromUIThread(CrxInstallerError(error)); 401 ReportFailureFromUIThread(CrxInstallerError(error));
412 return; 402 return;
413 } 403 }
414 404
415 GURL overlapping_url; 405 GURL overlapping_url;
416 const Extension* overlapping_extension = 406 const Extension* overlapping_extension =
417 frontend_weak_->extensions()-> 407 frontend_weak_->extensions()->
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 // is problematic because they don't know anything about the 609 // is problematic because they don't know anything about the
620 // extension before it is unpacked, so they cannot filter based 610 // extension before it is unpacked, so they cannot filter based
621 // on the extension. 611 // on the extension.
622 content::NotificationService::current()->Notify( 612 content::NotificationService::current()->Notify(
623 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 613 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
624 content::Source<CrxInstaller>(this), 614 content::Source<CrxInstaller>(this),
625 content::Details<const Extension>(extension)); 615 content::Details<const Extension>(extension));
626 } 616 }
627 617
628 } // namespace extensions 618 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698