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

Unified Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 11506: Make the net resource interface use StringPiece instead of std::string. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_main.cc
===================================================================
--- webkit/tools/test_shell/test_shell_main.cc (revision 5738)
+++ webkit/tools/test_shell/test_shell_main.cc (working copy)
@@ -31,6 +31,7 @@
#include "base/process_util.h"
#include "base/rand_util.h"
#include "base/stats_table.h"
+#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/trace_event.h"
@@ -58,17 +59,17 @@
static int kStatsFileCounters = 200;
#if defined(OS_WIN)
-std::string GetDataResource(HMODULE module, int resource_id) {
+StringPiece GetRawDataResource(HMODULE module, int resource_id) {
void* data_ptr;
size_t data_size;
return base::GetDataResourceFromModule(module, resource_id, &data_ptr,
&data_size) ?
- std::string(static_cast<char*>(data_ptr), data_size) : std::string();
+ StringPiece(static_cast<char*>(data_ptr), data_size) : StringPiece();
}
// This is called indirectly by the network layer to access resources.
-std::string NetResourceProvider(int key) {
- return GetDataResource(::GetModuleHandle(NULL), key);
+StringPiece NetResourceProvider(int key) {
+ return GetRawDataResource(::GetModuleHandle(NULL), key);
}
#endif
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698