OLD | NEW |
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/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 void UnpackedInstaller::OnInstallChecksComplete(int failed_checks) { | 244 void UnpackedInstaller::OnInstallChecksComplete(int failed_checks) { |
245 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 245 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
246 | 246 |
247 if (!install_checker_.policy_error().empty()) { | 247 if (!install_checker_.policy_error().empty()) { |
248 ReportExtensionLoadError(install_checker_.policy_error()); | 248 ReportExtensionLoadError(install_checker_.policy_error()); |
249 return; | 249 return; |
250 } | 250 } |
251 | 251 |
252 if (!install_checker_.requirement_errors().empty()) { | 252 if (!install_checker_.requirement_errors().empty()) { |
253 ReportExtensionLoadError( | 253 ReportExtensionLoadError( |
254 JoinString(install_checker_.requirement_errors(), ' ')); | 254 base::JoinString(install_checker_.requirement_errors(), " ")); |
255 return; | 255 return; |
256 } | 256 } |
257 | 257 |
258 InstallExtension(); | 258 InstallExtension(); |
259 } | 259 } |
260 | 260 |
261 int UnpackedInstaller::GetFlags() { | 261 int UnpackedInstaller::GetFlags() { |
262 std::string id = crx_file::id_util::GenerateIdForPath(extension_path_); | 262 std::string id = crx_file::id_util::GenerateIdForPath(extension_path_); |
263 bool allow_file_access = | 263 bool allow_file_access = |
264 Manifest::ShouldAlwaysAllowFileAccess(Manifest::UNPACKED); | 264 Manifest::ShouldAlwaysAllowFileAccess(Manifest::UNPACKED); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 service_weak_->OnExtensionInstalled( | 369 service_weak_->OnExtensionInstalled( |
370 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately); | 370 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately); |
371 | 371 |
372 if (!callback_.is_null()) { | 372 if (!callback_.is_null()) { |
373 callback_.Run(extension(), extension_path_, std::string()); | 373 callback_.Run(extension(), extension_path_, std::string()); |
374 callback_.Reset(); | 374 callback_.Reset(); |
375 } | 375 } |
376 } | 376 } |
377 | 377 |
378 } // namespace extensions | 378 } // namespace extensions |
OLD | NEW |