| Index: Source/platform/PlatformResourceLoader.cpp
|
| diff --git a/Source/platform/PlatformResourceLoader.cpp b/Source/platform/PlatformResourceLoader.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..13b21aa69598fd37a345cffc1c80e3f8f273a376
|
| --- /dev/null
|
| +++ b/Source/platform/PlatformResourceLoader.cpp
|
| @@ -0,0 +1,21 @@
|
| +// Copyright 2014 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 "config.h"
|
| +#include "PlatformResourceLoader.h"
|
| +
|
| +#include "public/platform/Platform.h"
|
| +#include "public/platform/WebData.h"
|
| +
|
| +namespace blink {
|
| +
|
| +String loadResourceAsASCIIString(const char* resource)
|
| +{
|
| + const WebData& resourceData = Platform::current()->loadResource(resource);
|
| + String dataString(resourceData.data(), resourceData.size());
|
| + ASSERT(!dataString.isEmpty() && dataString.containsOnlyASCII());
|
| + return dataString;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|