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

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

Issue 8380006: Exempt component and policy-installed extensions from policy blacklist check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, add comment regarding policy check on startup. Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (frontend_weak_->extension_prefs() 371 if (frontend_weak_->extension_prefs()
372 ->IsExtensionBlacklisted(extension_->id())) { 372 ->IsExtensionBlacklisted(extension_->id())) {
373 VLOG(1) << "This extension: " << extension_->id() 373 VLOG(1) << "This extension: " << extension_->id()
374 << " is blacklisted. Install failed."; 374 << " is blacklisted. Install failed.";
375 ReportFailureFromUIThread( 375 ReportFailureFromUIThread(
376 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED)); 376 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_BLACKLISTED));
377 return; 377 return;
378 } 378 }
379 379
380 if (!frontend_weak_->extension_prefs()->IsExtensionAllowedByPolicy( 380 if (!frontend_weak_->extension_prefs()->IsExtensionAllowedByPolicy(
381 extension_->id())) { 381 extension_->id(), install_source_)) {
382 ReportFailureFromUIThread( 382 ReportFailureFromUIThread(
383 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_POLICY_BLACKLIST)); 383 l10n_util::GetStringUTF8(IDS_EXTENSION_CANT_INSTALL_POLICY_BLACKLIST));
384 return; 384 return;
385 } 385 }
386 386
387 GURL overlapping_url; 387 GURL overlapping_url;
388 const Extension* overlapping_extension = 388 const Extension* overlapping_extension =
389 frontend_weak_-> 389 frontend_weak_->
390 GetExtensionByOverlappingWebExtent(extension_->web_extent()); 390 GetExtensionByOverlappingWebExtent(extension_->web_extent());
391 if (overlapping_extension && 391 if (overlapping_extension &&
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 // Some users (such as the download shelf) need to know when a 596 // Some users (such as the download shelf) need to know when a
597 // CRXInstaller is done. Listening for the EXTENSION_* events 597 // CRXInstaller is done. Listening for the EXTENSION_* events
598 // is problematic because they don't know anything about the 598 // is problematic because they don't know anything about the
599 // extension before it is unpacked, so they can not filter based 599 // extension before it is unpacked, so they can not filter based
600 // on the extension. 600 // on the extension.
601 content::NotificationService::current()->Notify( 601 content::NotificationService::current()->Notify(
602 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 602 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
603 content::Source<CrxInstaller>(this), 603 content::Source<CrxInstaller>(this),
604 content::NotificationService::NoDetails()); 604 content::NotificationService::NoDetails());
605 } 605 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698