diff options
author | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 13:52:05 +0000 |
---|---|---|
committer | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 13:52:05 +0000 |
commit | 80a3f81ca86067f3d4613ec0da57e53df77b2007 (patch) | |
tree | 448ba0f3726f460a7bd288d6bda722010f9ef1ce /content | |
parent | 58af219f1d05cc71d77a3627ddc4ca3cbeefb289 (diff) | |
download | chromium_src-80a3f81ca86067f3d4613ec0da57e53df77b2007.zip chromium_src-80a3f81ca86067f3d4613ec0da57e53df77b2007.tar.gz chromium_src-80a3f81ca86067f3d4613ec0da57e53df77b2007.tar.bz2 |
Update OnURLFetchComplete() to use new params in AutofillDownloadManager.
BUG=83592
TEST=compiles
Review URL: http://codereview.chromium.org/7979015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102493 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/net/url_fetcher.h | 10 | ||||
-rw-r--r-- | content/test/test_url_fetcher_factory.cc | 4 | ||||
-rw-r--r-- | content/test/test_url_fetcher_factory.h | 1 |
3 files changed, 9 insertions, 6 deletions
diff --git a/content/common/net/url_fetcher.h b/content/common/net/url_fetcher.h index 0d73d64..1e58a1d 100644 --- a/content/common/net/url_fetcher.h +++ b/content/common/net/url_fetcher.h @@ -250,6 +250,10 @@ class CONTENT_EXPORT URLFetcher { // set to store the response as a string. virtual bool GetResponseAsString(std::string* out_response_string) const; + // Return a const reference to the string data fetched. Response type + // must be STRING, or this will CHECK. + virtual const std::string& GetResponseStringRef() const; + // Get the path to the file containing the response body. Returns false // if the response body was not saved to a file. If take_ownership is // true, caller takes responsibility for the temp file, and it will not @@ -279,12 +283,6 @@ class CONTENT_EXPORT URLFetcher { // Used by tests. const std::string& upload_data() const; - // Return a reference to the string data fetched. Response type must - // be STRING, or this will CHECK. This method exists to support the - // old signiture to OnURLFetchComplete(), and will be removed as part - // of crbug.com/83592 . - virtual const std::string& GetResponseStringRef() const; - virtual void SetResponseDestinationForTesting(ResponseDestinationType); virtual ResponseDestinationType GetResponseDestinationForTesting() const; diff --git a/content/test/test_url_fetcher_factory.cc b/content/test/test_url_fetcher_factory.cc index 5062b46..b079b3e 100644 --- a/content/test/test_url_fetcher_factory.cc +++ b/content/test/test_url_fetcher_factory.cc @@ -58,6 +58,10 @@ void TestURLFetcher::SetResponseFilePath(const FilePath& path) { fake_response_file_path_ = path; } +const std::string& TestURLFetcher::GetResponseStringRef() const { + return fake_response_string_; +} + bool TestURLFetcher::GetResponseAsString( std::string* out_response_string) const { if (GetResponseDestinationForTesting() != STRING) diff --git a/content/test/test_url_fetcher_factory.h b/content/test/test_url_fetcher_factory.h index c003106..c6cd0aa 100644 --- a/content/test/test_url_fetcher_factory.h +++ b/content/test/test_url_fetcher_factory.h @@ -103,6 +103,7 @@ class TestURLFetcher : public URLFetcher { void SetResponseFilePath(const FilePath& path); // Override response access functions to return fake data. + virtual const std::string& GetResponseStringRef() const OVERRIDE; virtual bool GetResponseAsString(std::string* out_response_string) const OVERRIDE; virtual bool GetResponseAsFilePath(bool take_ownership, |