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

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

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/unpacked_installer.h" 5 #include "chrome/browser/extensions/unpacked_installer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 292
293 void UnpackedInstaller::ReportExtensionLoadError(const std::string &error) { 293 void UnpackedInstaller::ReportExtensionLoadError(const std::string &error) {
294 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 294 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
295 if (!service_weak_.get()) 295 if (!service_weak_.get())
296 return; 296 return;
297 service_weak_->ReportExtensionLoadError(extension_path_, error, true); 297 service_weak_->ReportExtensionLoadError(extension_path_, error, true);
298 } 298 }
299 299
300 void UnpackedInstaller::ConfirmInstall() { 300 void UnpackedInstaller::ConfirmInstall() {
301 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 301 DCHECK_CURRENTLY_ON(BrowserThread::UI);
302 base::string16 error = installer_.CheckManagementPolicy(); 302 base::string16 error = installer_.CheckManagementPolicy();
303 if (!error.empty()) { 303 if (!error.empty()) {
304 ReportExtensionLoadError(base::UTF16ToUTF8(error)); 304 ReportExtensionLoadError(base::UTF16ToUTF8(error));
305 return; 305 return;
306 } 306 }
307 307
308 PermissionsUpdater perms_updater(service_weak_->profile()); 308 PermissionsUpdater perms_updater(service_weak_->profile());
309 perms_updater.GrantActivePermissions(installer_.extension().get()); 309 perms_updater.GrantActivePermissions(installer_.extension().get());
310 310
311 service_weak_->OnExtensionInstalled( 311 service_weak_->OnExtensionInstalled(
312 installer_.extension().get(), 312 installer_.extension().get(),
313 syncer::StringOrdinal(), 313 syncer::StringOrdinal(),
314 false /* no requirement errors */, 314 false /* no requirement errors */,
315 NOT_BLACKLISTED, 315 NOT_BLACKLISTED,
316 false /* don't wait for idle */); 316 false /* don't wait for idle */);
317 } 317 }
318 318
319 } // namespace extensions 319 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698