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

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

Issue 418031: Properly report blacklisted extension errors (currently, blacklisted extensio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 result->swap(decoded); 197 result->swap(decoded);
198 } 198 }
199 199
200 void CrxInstaller::ConfirmInstall() { 200 void CrxInstaller::ConfirmInstall() {
201 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); 201 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
202 if (frontend_->extension_prefs()->IsExtensionBlacklisted(extension_->id())) { 202 if (frontend_->extension_prefs()->IsExtensionBlacklisted(extension_->id())) {
203 LOG(INFO) << "This extension: " << extension_->id() 203 LOG(INFO) << "This extension: " << extension_->id()
204 << " is blacklisted. Install failed."; 204 << " is blacklisted. Install failed.";
205 if (client_.get()) { 205 ReportFailureFromUIThread("This extension is blacklisted.");
206 client_->OnInstallFailure("This extension is blacklisted.");
207 }
208 return; 206 return;
209 } 207 }
210 208
211 current_version_ = 209 current_version_ =
212 frontend_->extension_prefs()->GetVersionString(extension_->id()); 210 frontend_->extension_prefs()->GetVersionString(extension_->id());
213 211
214 if (client_.get()) { 212 if (client_.get()) {
215 AddRef(); // Balanced in Proceed() and Abort(). 213 AddRef(); // Balanced in Proceed() and Abort().
216 client_->ConfirmInstall(this, extension_.get(), install_icon_.get()); 214 client_->ConfirmInstall(this, extension_.get(), install_icon_.get());
217 } else { 215 } else {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 client_->OnInstallSuccess(extension_.get()); 343 client_->OnInstallSuccess(extension_.get());
346 344
347 // Tell the frontend about the installation and hand off ownership of 345 // Tell the frontend about the installation and hand off ownership of
348 // extension_ to it. 346 // extension_ to it.
349 frontend_->OnExtensionInstalled(extension_.release(), 347 frontend_->OnExtensionInstalled(extension_.release(),
350 allow_privilege_increase_); 348 allow_privilege_increase_);
351 349
352 // We're done. We don't post any more tasks to ourselves so we are deleted 350 // We're done. We don't post any more tasks to ourselves so we are deleted
353 // soon. 351 // soon.
354 } 352 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698