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-25 17:56:12 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-25 17:56:12 +0000
commit7cc6e5639982a9f912c46572dafa4a42682fbd04 (patch)
treeaeda0f815ef8b72e5c2c154d66ab21c43dc9f9dc /chrome/browser/bug_report_util.cc
parentea725b3aa4fe6ffdb15610d3a6a14d620088d878 (diff)
downloadchromium_src-7cc6e5639982a9f912c46572dafa4a42682fbd04.zip
chromium_src-7cc6e5639982a9f912c46572dafa4a42682fbd04.tar.gz
chromium_src-7cc6e5639982a9f912c46572dafa4a42682fbd04.tar.bz2
Create a content::UrlFetcher interface that lives in content/public/common and convert users to it. I have added a static create function, but will switch instantiations to use it in another change since this has grown a lot. Basically this change converts function names away from unix_hacker style, which they shouldn't have been using anyways since some are virtual, and made all of the other functions virtual.
BUG=98716 Review URL: http://codereview.chromium.org/8375039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bug_report_util.cc')
-rw-r--r--chrome/browser/bug_report_util.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc
index adf0f05..1adb185 100644
--- a/chrome/browser/bug_report_util.cc
+++ b/chrome/browser/bug_report_util.cc
@@ -88,7 +88,7 @@ class BugReportUtil::PostCleanup : public content::URLFetcherDelegate {
post_body_(post_body),
previous_delay_(previous_delay) { }
// Overridden from content::URLFetcherDelegate.
- virtual void OnURLFetchComplete(const URLFetcher* source);
+ virtual void OnURLFetchComplete(const content::URLFetcher* source);
protected:
virtual ~PostCleanup() {}
@@ -104,10 +104,10 @@ class BugReportUtil::PostCleanup : public content::URLFetcherDelegate {
// 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) {
-
+void BugReportUtil::PostCleanup::OnURLFetchComplete(
+ const content::URLFetcher* source) {
std::stringstream error_stream;
- int response_code = source->response_code();
+ int response_code = source->GetResponseCode();
if (response_code == kHttpPostSuccessNoContent) {
// We've sent our report, delete the report data
delete post_body_;
@@ -136,8 +136,8 @@ void BugReportUtil::PostCleanup::OnURLFetchComplete(const URLFetcher* source) {
}
}
- LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << source->url()
- << ") status: " << error_stream.str();
+ LOG(WARNING) << "FEEDBACK: Submission to feedback server (" <<
+ source->GetUrl() << ") status: " << error_stream.str();
// Delete the URLFetcher.
delete source;
@@ -192,9 +192,9 @@ void BugReportUtil::SendFeedback(Profile* profile,
new BugReportUtil::PostCleanup(profile,
post_body,
previous_delay));
- fetcher->set_request_context(profile->GetRequestContext());
+ fetcher->SetRequestContext(profile->GetRequestContext());
- fetcher->set_upload_data(std::string(kProtBufMimeType), *post_body);
+ fetcher->SetUploadData(std::string(kProtBufMimeType), *post_body);
fetcher->Start();
}