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

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

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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) 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 "extensions/browser/sandboxed_unpacker.h" 5 #include "extensions/browser/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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 for (size_t i = 0; i < images.size(); ++i) { 735 for (size_t i = 0; i < images.size(); ++i) {
736 if (BrowserThread::GetBlockingPool()->IsShutdownInProgress()) { 736 if (BrowserThread::GetBlockingPool()->IsShutdownInProgress()) {
737 // Abort package installation if shutdown was initiated, crbug.com/235525 737 // Abort package installation if shutdown was initiated, crbug.com/235525
738 ReportFailure( 738 ReportFailure(
739 ABORTED_DUE_TO_SHUTDOWN, 739 ABORTED_DUE_TO_SHUTDOWN,
740 l10n_util::GetStringFUTF16(IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 740 l10n_util::GetStringFUTF16(IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
741 ASCIIToUTF16("ABORTED_DUE_TO_SHUTDOWN"))); 741 ASCIIToUTF16("ABORTED_DUE_TO_SHUTDOWN")));
742 return false; 742 return false;
743 } 743 }
744 744
745 const SkBitmap& image = get<0>(images[i]); 745 const SkBitmap& image = base::get<0>(images[i]);
746 base::FilePath path_suffix = get<1>(images[i]); 746 base::FilePath path_suffix = base::get<1>(images[i]);
747 if (path_suffix.MaybeAsASCII() == install_icon_path) 747 if (path_suffix.MaybeAsASCII() == install_icon_path)
748 *install_icon = image; 748 *install_icon = image;
749 749
750 if (path_suffix.IsAbsolute() || path_suffix.ReferencesParent()) { 750 if (path_suffix.IsAbsolute() || path_suffix.ReferencesParent()) {
751 // Invalid path for bitmap image. 751 // Invalid path for bitmap image.
752 ReportFailure(INVALID_PATH_FOR_BITMAP_IMAGE, 752 ReportFailure(INVALID_PATH_FOR_BITMAP_IMAGE,
753 l10n_util::GetStringFUTF16( 753 l10n_util::GetStringFUTF16(
754 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 754 IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
755 ASCIIToUTF16("INVALID_PATH_FOR_BITMAP_IMAGE"))); 755 ASCIIToUTF16("INVALID_PATH_FOR_BITMAP_IMAGE")));
756 return false; 756 return false;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 853
854 void SandboxedUnpacker::Cleanup() { 854 void SandboxedUnpacker::Cleanup() {
855 DCHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread()); 855 DCHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread());
856 if (!temp_dir_.Delete()) { 856 if (!temp_dir_.Delete()) {
857 LOG(WARNING) << "Can not delete temp directory at " 857 LOG(WARNING) << "Can not delete temp directory at "
858 << temp_dir_.path().value(); 858 << temp_dir_.path().value();
859 } 859 }
860 } 860 }
861 861
862 } // namespace extensions 862 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/alarms/alarms_api_unittest.cc ('k') | extensions/common/extension_utility_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698