summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bug_report_util.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 18:18:34 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 18:18:34 +0000
commitc530c85aa67a10aac9a77d10970951633ff686d9 (patch)
tree5b0943bd7369f48053075a75db9cf6e5a0d1514d /chrome/browser/bug_report_util.cc
parentb4c95f61571c24ea1fc15fed0eda1269fe75d94b (diff)
downloadchromium_src-c530c85aa67a10aac9a77d10970951633ff686d9.zip
chromium_src-c530c85aa67a10aac9a77d10970951633ff686d9.tar.gz
chromium_src-c530c85aa67a10aac9a77d10970951633ff686d9.tar.bz2
Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old URLFetcher delegate callback while I'm touching all of them.BUG=98716,83592
Review URL: http://codereview.chromium.org/8373021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bug_report_util.cc')
-rw-r--r--chrome/browser/bug_report_util.cc25
1 files changed, 8 insertions, 17 deletions
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc
index 389b082..adf0f05 100644
--- a/chrome/browser/bug_report_util.cc
+++ b/chrome/browser/bug_report_util.cc
@@ -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 @@ const int64 kRetryDelayLimit = 14400000; // 4 hours
} // 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 @@ class BugReportUtil::PostCleanup : public URLFetcher::Delegate {
// 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 @@ void BugReportUtil::PostCleanup::OnURLFetchComplete(
}
}
- LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << url
+ LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << source->url()
<< ") status: " << error_stream.str();
// Delete the URLFetcher.