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

Side by Side Diff: chrome/utility/extensions/unpacker.cc

Issue 94013004: Add base:: to string16s in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 7 years 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/utility/extensions/unpacker.h" 5 #include "chrome/utility/extensions/unpacker.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 internal_data_->decoded_images.push_back(MakeTuple(image_bitmap, path)); 282 internal_data_->decoded_images.push_back(MakeTuple(image_bitmap, path));
283 return true; 283 return true;
284 } 284 }
285 285
286 bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) { 286 bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) {
287 std::string error; 287 std::string error;
288 JSONFileValueSerializer serializer(message_path); 288 JSONFileValueSerializer serializer(message_path);
289 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>( 289 scoped_ptr<base::DictionaryValue> root(static_cast<base::DictionaryValue*>(
290 serializer.Deserialize(NULL, &error))); 290 serializer.Deserialize(NULL, &error)));
291 if (!root.get()) { 291 if (!root.get()) {
292 string16 messages_file = message_path.LossyDisplayName(); 292 base::string16 messages_file = message_path.LossyDisplayName();
293 if (error.empty()) { 293 if (error.empty()) {
294 // If file is missing, Deserialize will fail with empty error. 294 // If file is missing, Deserialize will fail with empty error.
295 SetError(base::StringPrintf("%s %s", errors::kLocalesMessagesFileMissing, 295 SetError(base::StringPrintf("%s %s", errors::kLocalesMessagesFileMissing,
296 UTF16ToUTF8(messages_file).c_str())); 296 UTF16ToUTF8(messages_file).c_str()));
297 } else { 297 } else {
298 SetError(base::StringPrintf("%s: %s", 298 SetError(base::StringPrintf("%s: %s",
299 UTF16ToUTF8(messages_file).c_str(), 299 UTF16ToUTF8(messages_file).c_str(),
300 error.c_str())); 300 error.c_str()));
301 } 301 }
302 return false; 302 return false;
(...skipping 13 matching lines...) Expand all
316 } 316 }
317 parsed_catalogs_->Set(dir_name, root.release()); 317 parsed_catalogs_->Set(dir_name, root.release());
318 318
319 return true; 319 return true;
320 } 320 }
321 321
322 void Unpacker::SetError(const std::string &error) { 322 void Unpacker::SetError(const std::string &error) {
323 SetUTF16Error(UTF8ToUTF16(error)); 323 SetUTF16Error(UTF8ToUTF16(error));
324 } 324 }
325 325
326 void Unpacker::SetUTF16Error(const string16 &error) { 326 void Unpacker::SetUTF16Error(const base::string16& error) {
327 error_message_ = error; 327 error_message_ = error;
328 } 328 }
329 329
330 } // namespace extensions 330 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/utility/extensions/unpacker.h ('k') | chrome/utility/importer/external_process_importer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698