diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 00:28:34 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 00:28:34 +0000 |
commit | 2dea04cdfc632bfe29d7ffb436827ea2726ec092 (patch) | |
tree | 519bcd708837a17fa5fb947451bc1e65e95443bf /chrome/browser | |
parent | c86288eec35b7718bdd01e7faefeb837b6bd8903 (diff) | |
download | chromium_src-2dea04cdfc632bfe29d7ffb436827ea2726ec092.zip chromium_src-2dea04cdfc632bfe29d7ffb436827ea2726ec092.tar.gz chromium_src-2dea04cdfc632bfe29d7ffb436827ea2726ec092.tar.bz2 |
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/11296
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5735 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_main.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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<LazyDirectoryListerCacher> 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. |