Index: chrome/browser/bug_report_util.cc |
=================================================================== |
--- chrome/browser/bug_report_util.cc (revision 106929) |
+++ chrome/browser/bug_report_util.cc (working copy) |
@@ -23,6 +23,7 @@ |
#include "chrome/common/chrome_version_info.h" |
#include "content/browser/tab_contents/tab_contents.h" |
#include "content/common/net/url_fetcher.h" |
+#include "content/public/common/url_fetcher_delegate.h" |
#include "googleurl/src/gurl.h" |
#include "grit/generated_resources.h" |
#include "grit/locale_settings.h" |
@@ -79,20 +80,15 @@ |
} // namespace |
-// Simple URLFetcher::Delegate to clean up URLFetcher on completion. |
-class BugReportUtil::PostCleanup : public URLFetcher::Delegate { |
+// Simple content::URLFetcherDelegate to clean up URLFetcher on completion. |
+class BugReportUtil::PostCleanup : public content::URLFetcherDelegate { |
public: |
PostCleanup(Profile* profile, std::string* post_body, |
int64 previous_delay) : profile_(profile), |
post_body_(post_body), |
previous_delay_(previous_delay) { } |
- // Overridden from URLFetcher::Delegate. |
- virtual void OnURLFetchComplete(const URLFetcher* source, |
- const GURL& url, |
- const net::URLRequestStatus& status, |
- int response_code, |
- const net::ResponseCookies& cookies, |
- const std::string& data); |
+ // Overridden from content::URLFetcherDelegate. |
+ virtual void OnURLFetchComplete(const URLFetcher* source); |
protected: |
virtual ~PostCleanup() {} |
@@ -108,15 +104,10 @@ |
// Don't use the data parameter, instead use the pointer we pass into every |
// post cleanup object - that pointer will be deleted and deleted only on a |
// successful post to the feedback server. |
-void BugReportUtil::PostCleanup::OnURLFetchComplete( |
- const URLFetcher* source, |
- const GURL& url, |
- const net::URLRequestStatus& status, |
- int response_code, |
- const net::ResponseCookies& cookies, |
- const std::string& data) { |
+void BugReportUtil::PostCleanup::OnURLFetchComplete(const URLFetcher* source) { |
std::stringstream error_stream; |
+ int response_code = source->response_code(); |
if (response_code == kHttpPostSuccessNoContent) { |
// We've sent our report, delete the report data |
delete post_body_; |
@@ -145,7 +136,7 @@ |
} |
} |
- LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << url |
+ LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << source->url() |
<< ") status: " << error_stream.str(); |
// Delete the URLFetcher. |