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

Unified Diff: Source/platform/Language.cpp

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporated review comments Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/Language.cpp
diff --git a/Source/platform/Language.cpp b/Source/platform/Language.cpp
old mode 100644
new mode 100755
index 535214cb0fc4cf58c91a849b77e384628a7971f2..f5c4f938e8af8098f71cbc69fd70609879977954
--- a/Source/platform/Language.cpp
+++ b/Source/platform/Language.cpp
@@ -27,18 +27,18 @@
#include "platform/Language.h"
#include "public/platform/Platform.h"
-#include "wtf/text/WTFString.h"
+#include "wtf/text/StringBuilder.h"
namespace WebCore {
static String platformLanguage()
{
- DEFINE_STATIC_LOCAL(String, computedDefaultLanguage, ());
+ DEFINE_STATIC_LOCAL(StringBuilder, computedDefaultLanguage, ());
if (computedDefaultLanguage.isEmpty()) {
computedDefaultLanguage.append(blink::Platform::current()->defaultLocale());
ASSERT(!computedDefaultLanguage.isEmpty());
}
- return computedDefaultLanguage;
+ return computedDefaultLanguage.toString();
}
String defaultLanguage()

Powered by Google App Engine
This is Rietveld 408576698