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

Side by Side Diff: extensions/utility/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
« no previous file with comments | « extensions/common/extension_utility_messages.h ('k') | ipc/ipc_message_macros.h » ('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 "extensions/utility/unpacker.h" 5 #include "extensions/utility/unpacker.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 SkBitmap image_bitmap = DecodeImage(temp_install_dir_.Append(path)); 258 SkBitmap image_bitmap = DecodeImage(temp_install_dir_.Append(path));
259 if (image_bitmap.isNull()) { 259 if (image_bitmap.isNull()) {
260 SetUTF16Error(l10n_util::GetStringFUTF16( 260 SetUTF16Error(l10n_util::GetStringFUTF16(
261 IDS_EXTENSION_PACKAGE_IMAGE_ERROR, 261 IDS_EXTENSION_PACKAGE_IMAGE_ERROR,
262 base::i18n::GetDisplayStringInLTRDirectionality( 262 base::i18n::GetDisplayStringInLTRDirectionality(
263 path.BaseName().LossyDisplayName()))); 263 path.BaseName().LossyDisplayName())));
264 return false; 264 return false;
265 } 265 }
266 266
267 internal_data_->decoded_images.push_back(MakeTuple(image_bitmap, path)); 267 internal_data_->decoded_images.push_back(base::MakeTuple(image_bitmap, path));
268 return true; 268 return true;
269 } 269 }
270 270
271 bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) { 271 bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) {
272 std::string error; 272 std::string error;
273 JSONFileValueDeserializer deserializer(message_path); 273 JSONFileValueDeserializer deserializer(message_path);
274 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>( 274 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>(
275 deserializer.Deserialize(NULL, &error))); 275 deserializer.Deserialize(NULL, &error)));
276 if (!root.get()) { 276 if (!root.get()) {
277 base::string16 messages_file = message_path.LossyDisplayName(); 277 base::string16 messages_file = message_path.LossyDisplayName();
(...skipping 27 matching lines...) Expand all
305 305
306 void Unpacker::SetError(const std::string& error) { 306 void Unpacker::SetError(const std::string& error) {
307 SetUTF16Error(base::UTF8ToUTF16(error)); 307 SetUTF16Error(base::UTF8ToUTF16(error));
308 } 308 }
309 309
310 void Unpacker::SetUTF16Error(const base::string16& error) { 310 void Unpacker::SetUTF16Error(const base::string16& error) {
311 error_message_ = error; 311 error_message_ = error;
312 } 312 }
313 313
314 } // namespace extensions 314 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension_utility_messages.h ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698