Index: media/base/media_resources.cc |
diff --git a/media/base/media_resources.cc b/media/base/media_resources.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b4ff3c8e5c2511b86ae9579e180a0accdaa4f6d4 |
--- /dev/null |
+++ b/media/base/media_resources.cc |
@@ -0,0 +1,27 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "media/base/media_resources.h" |
+ |
+#include "base/logging.h" |
+#include "base/strings/utf_string_conversions.h" |
+ |
+namespace media { |
+ |
+static LocalizedStringProvider g_localized_string_provider = nullptr; |
+ |
+void SetLocalizedStringProvider(LocalizedStringProvider func) { |
+ g_localized_string_provider = func; |
+} |
+ |
+std::string GetLocalizedStringUTF8(MessageId message_id) { |
+ return base::UTF16ToUTF8(GetLocalizedStringUTF16(message_id)); |
+} |
+ |
+base::string16 GetLocalizedStringUTF16(MessageId message_id) { |
+ return g_localized_string_provider ? g_localized_string_provider(message_id) |
+ : base::string16(); |
+} |
+ |
+} // namespace media |