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

Unified Diff: net/base/net_module.h

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 | « chrome/browser/browser_main.cc ('k') | net/base/net_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_module.h
===================================================================
--- net/base/net_module.h (revision 5738)
+++ net/base/net_module.h (working copy)
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/string_piece.h"
namespace net {
@@ -20,7 +21,7 @@
//
class NetModule {
public:
- typedef std::string (*ResourceProvider)(int key);
+ typedef StringPiece (*ResourceProvider)(int key);
// Set the function to call when the net module needs resources
static void SetResourceProvider(ResourceProvider func);
@@ -28,7 +29,7 @@
// Call the resource provider (if one exists) to get the specified resource.
// Returns an empty string if the resource does not exist or if there is no
// resource provider.
- static std::string GetResource(int key);
+ static StringPiece GetResource(int key);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(NetModule);
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | net/base/net_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698