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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 INVALID_CATALOG_DATA, 742 INVALID_CATALOG_DATA,
743 l10n_util::GetStringFUTF16( 743 l10n_util::GetStringFUTF16(
744 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 744 IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
745 ASCIIToUTF16("INVALID_CATALOG_DATA"))); 745 ASCIIToUTF16("INVALID_CATALOG_DATA")));
746 return false; 746 return false;
747 } 747 }
748 748
749 // TODO(viettrungluu): Fix the |FilePath::FromWStringHack(UTF8ToWide())| 749 // TODO(viettrungluu): Fix the |FilePath::FromWStringHack(UTF8ToWide())|
750 // hack and remove the corresponding #include. 750 // hack and remove the corresponding #include.
751 base::FilePath relative_path = 751 base::FilePath relative_path =
752 base::FilePath::FromWStringHack(UTF8ToWide(*key_it)); 752 base::FilePath::FromWStringHack(base::UTF8ToWide(*key_it));
753 relative_path = relative_path.Append(Extension::kMessagesFilename); 753 relative_path = relative_path.Append(Extension::kMessagesFilename);
754 if (relative_path.IsAbsolute() || relative_path.ReferencesParent()) { 754 if (relative_path.IsAbsolute() || relative_path.ReferencesParent()) {
755 // Invalid path for catalog. 755 // Invalid path for catalog.
756 ReportFailure( 756 ReportFailure(
757 INVALID_PATH_FOR_CATALOG, 757 INVALID_PATH_FOR_CATALOG,
758 l10n_util::GetStringFUTF16( 758 l10n_util::GetStringFUTF16(
759 IDS_EXTENSION_PACKAGE_INSTALL_ERROR, 759 IDS_EXTENSION_PACKAGE_INSTALL_ERROR,
760 ASCIIToUTF16("INVALID_PATH_FOR_CATALOG"))); 760 ASCIIToUTF16("INVALID_PATH_FOR_CATALOG")));
761 return false; 761 return false;
762 } 762 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 795
796 void SandboxedUnpacker::Cleanup() { 796 void SandboxedUnpacker::Cleanup() {
797 DCHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread()); 797 DCHECK(unpacker_io_task_runner_->RunsTasksOnCurrentThread());
798 if (!temp_dir_.Delete()) { 798 if (!temp_dir_.Delete()) {
799 LOG(WARNING) << "Can not delete temp directory at " 799 LOG(WARNING) << "Can not delete temp directory at "
800 << temp_dir_.path().value(); 800 << temp_dir_.path().value();
801 } 801 }
802 } 802 }
803 803
804 } // namespace extensions 804 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/page_action_browsertest.cc ('k') | chrome/browser/first_run/first_run_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698