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

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

Issue 448193002: Cleanup: Make ExtensionIconSet::Get return a const std::string& rather than a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | extensions/browser/extension_icon_image.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/extension_icon_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698