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

Side by Side Diff: chrome/common/extensions/message_bundle.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/common/extensions/message_bundle.h" 5 #include "chrome/common/extensions/message_bundle.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 // static 297 // static
298 std::string MessageBundle::GetL10nMessage(const std::string& name, 298 std::string MessageBundle::GetL10nMessage(const std::string& name,
299 const SubstitutionMap& dictionary) { 299 const SubstitutionMap& dictionary) {
300 SubstitutionMap::const_iterator it = 300 SubstitutionMap::const_iterator it =
301 dictionary.find(StringToLowerASCII(name)); 301 dictionary.find(StringToLowerASCII(name));
302 if (it != dictionary.end()) { 302 if (it != dictionary.end()) {
303 return it->second; 303 return it->second;
304 } 304 }
305 305
306 return ""; 306 return std::string();
307 } 307 }
308 308
309 /////////////////////////////////////////////////////////////////////////////// 309 ///////////////////////////////////////////////////////////////////////////////
310 // 310 //
311 // Renderer helper functions. 311 // Renderer helper functions.
312 // 312 //
313 /////////////////////////////////////////////////////////////////////////////// 313 ///////////////////////////////////////////////////////////////////////////////
314 314
315 // Unique class for Singleton. 315 // Unique class for Singleton.
316 struct ExtensionToMessagesMap { 316 struct ExtensionToMessagesMap {
(...skipping 22 matching lines...) Expand all
339 return &(it->second); 339 return &(it->second);
340 340
341 return NULL; 341 return NULL;
342 } 342 }
343 343
344 void EraseL10nMessagesMap(const std::string& extension_id) { 344 void EraseL10nMessagesMap(const std::string& extension_id) {
345 g_extension_to_messages_map.Get().messages_map.erase(extension_id); 345 g_extension_to_messages_map.Get().messages_map.erase(extension_id);
346 } 346 }
347 347
348 } // namespace extensions 348 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698