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

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

Issue 2783813002: Move ChromeRequirementsChecker to //extensions as a PreloadCheck (Closed)
Patch Set: minor test cleanup Created 3 years, 8 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) 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/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 void UnpackedInstaller::OnInstallChecksComplete(int failed_checks) { 253 void UnpackedInstaller::OnInstallChecksComplete(int failed_checks) {
254 DCHECK_CURRENTLY_ON(BrowserThread::UI); 254 DCHECK_CURRENTLY_ON(BrowserThread::UI);
255 255
256 if (!install_checker_->policy_error().empty()) { 256 if (!install_checker_->policy_error().empty()) {
257 ReportExtensionLoadError(install_checker_->policy_error()); 257 ReportExtensionLoadError(install_checker_->policy_error());
258 return; 258 return;
259 } 259 }
260 260
261 if (!install_checker_->requirement_errors().empty()) { 261 if (!install_checker_->requirements_error_message().empty()) {
262 ReportExtensionLoadError( 262 ReportExtensionLoadError(install_checker_->requirements_error_message());
263 base::JoinString(install_checker_->requirement_errors(), " "));
264 return; 263 return;
265 } 264 }
266 265
267 InstallExtension(); 266 InstallExtension();
268 } 267 }
269 268
270 int UnpackedInstaller::GetFlags() { 269 int UnpackedInstaller::GetFlags() {
271 std::string id = crx_file::id_util::GenerateIdForPath(extension_path_); 270 std::string id = crx_file::id_util::GenerateIdForPath(extension_path_);
272 bool allow_file_access = 271 bool allow_file_access =
273 Manifest::ShouldAlwaysAllowFileAccess(Manifest::UNPACKED); 272 Manifest::ShouldAlwaysAllowFileAccess(Manifest::UNPACKED);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 service_weak_->OnExtensionInstalled( 381 service_weak_->OnExtensionInstalled(
383 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately); 382 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately);
384 383
385 if (!callback_.is_null()) { 384 if (!callback_.is_null()) {
386 callback_.Run(extension(), extension_path_, std::string()); 385 callback_.Run(extension(), extension_path_, std::string());
387 callback_.Reset(); 386 callback_.Reset();
388 } 387 }
389 } 388 }
390 389
391 } // namespace extensions 390 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698