From 73f5d66b06b9a02626a8addecb24986a88430176 Mon Sep 17 00:00:00 2001 From: "deanm@chromium.org" Date: Thu, 20 Nov 2008 01:08:17 +0000 Subject: Make the net resource interface use StringPiece instead of std::string. This means we can point directly into the resource in the binary, instead of copying. This makes sense for the TLD data, which doesn't need to be copied around. Review URL: http://codereview.chromium.org/11506 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5740 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chrome/browser/browser_main.cc') diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 91973ba..5bc0e9b 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -117,11 +117,11 @@ base::LazyInstance lazy_dir_lister( base::LINKER_INITIALIZED); // This is called indirectly by the network layer to access resources. -std::string NetResourceProvider(int key) { +StringPiece NetResourceProvider(int key) { if (IDR_DIR_HEADER_HTML == key) - return lazy_dir_lister.Pointer()->html_data; + return StringPiece(lazy_dir_lister.Pointer()->html_data); - return ResourceBundle::GetSharedInstance().GetDataResource(key); + return ResourceBundle::GetSharedInstance().GetRawDataResource(key); } // Displays a warning message if the user is running chrome on windows 2000. -- cgit v1.1