| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sandboxed_unpacker.h" | 5 #include "chrome/browser/extensions/sandboxed_unpacker.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 // Error removing old image file. | 687 // Error removing old image file. |
| 688 ReportFailure( | 688 ReportFailure( |
| 689 ERROR_REMOVING_OLD_IMAGE_FILE, | 689 ERROR_REMOVING_OLD_IMAGE_FILE, |
| 690 l10n_util::GetStringFUTF16( | 690 l10n_util::GetStringFUTF16( |
| 691 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, | 691 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, |
| 692 ASCIIToUTF16("ERROR_REMOVING_OLD_IMAGE_FILE"))); | 692 ASCIIToUTF16("ERROR_REMOVING_OLD_IMAGE_FILE"))); |
| 693 return false; | 693 return false; |
| 694 } | 694 } |
| 695 } | 695 } |
| 696 | 696 |
| 697 std::string install_icon_path = IconsInfo::GetIcons(extension_).Get( | 697 const std::string& install_icon_path = IconsInfo::GetIcons(extension_).Get( |
| 698 extension_misc::EXTENSION_ICON_LARGE, | 698 extension_misc::EXTENSION_ICON_LARGE, ExtensionIconSet::MATCH_BIGGER); |
| 699 ExtensionIconSet::MATCH_BIGGER); | |
| 700 | 699 |
| 701 // Write our parsed images back to disk as well. | 700 // Write our parsed images back to disk as well. |
| 702 for (size_t i = 0; i < images.size(); ++i) { | 701 for (size_t i = 0; i < images.size(); ++i) { |
| 703 if (BrowserThread::GetBlockingPool()->IsShutdownInProgress()) { | 702 if (BrowserThread::GetBlockingPool()->IsShutdownInProgress()) { |
| 704 // Abort package installation if shutdown was initiated, crbug.com/235525 | 703 // Abort package installation if shutdown was initiated, crbug.com/235525 |
| 705 ReportFailure( | 704 ReportFailure( |
| 706 ABORTED_DUE_TO_SHUTDOWN, | 705 ABORTED_DUE_TO_SHUTDOWN, |
| 707 l10n_util::GetStringFUTF16( | 706 l10n_util::GetStringFUTF16( |
| 708 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, | 707 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, |
| 709 ASCIIToUTF16("ABORTED_DUE_TO_SHUTDOWN"))); | 708 ASCIIToUTF16("ABORTED_DUE_TO_SHUTDOWN"))); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 | 828 |
| 830 void SandboxedUnpacker::Cleanup() { | 829 void SandboxedUnpacker::Cleanup() { |
| 831 DCHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread()); | 830 DCHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread()); |
| 832 if (!temp_dir_.Delete()) { | 831 if (!temp_dir_.Delete()) { |
| 833 LOG(WARNING) << "Can not delete temp directory at " | 832 LOG(WARNING) << "Can not delete temp directory at " |
| 834 << temp_dir_.path().value(); | 833 << temp_dir_.path().value(); |
| 835 } | 834 } |
| 836 } | 835 } |
| 837 | 836 |
| 838 } // namespace extensions | 837 } // namespace extensions |
| OLD | NEW |