summaryrefslogtreecommitdiffstats
path: root/chrome/browser/url_fetcher.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 21:08:50 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 21:08:50 +0000
commit66aa1265b6ff166987ffc294b7796f827abd27bc (patch)
tree3545777d69c046f64074a00e782aac5d3228838f /chrome/browser/url_fetcher.cc
parent15069dbc92e8768284393fe18a23f79106cd552e (diff)
downloadchromium_src-66aa1265b6ff166987ffc294b7796f827abd27bc.zip
chromium_src-66aa1265b6ff166987ffc294b7796f827abd27bc.tar.gz
chromium_src-66aa1265b6ff166987ffc294b7796f827abd27bc.tar.bz2
Run MetricsResponseTest on the Mac. This test depended on
url_fetcher_protect.h, which contained a ProtectEntry class, but this name conflicts with the ProtectEntry function in QuickDraw, and apparently QuickDraw headers were being brought in by some other system header we use. Rename our ProtectEntry to URLFetcherProtectEntry, and change ProtectManager for consistency. Review URL: http://codereview.chromium.org/7834 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/url_fetcher.cc')
-rw-r--r--chrome/browser/url_fetcher.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/url_fetcher.cc b/chrome/browser/url_fetcher.cc
index 1a97053..e40d414 100644
--- a/chrome/browser/url_fetcher.cc
+++ b/chrome/browser/url_fetcher.cc
@@ -36,7 +36,7 @@ URLFetcher::Core::Core(URLFetcher* fetcher,
request_(NULL),
response_code_(-1),
load_flags_(net::LOAD_NORMAL),
- protect_entry_(ProtectManager::GetInstance()->Register(
+ protect_entry_(URLFetcherProtectManager::GetInstance()->Register(
original_url_.host())),
num_retries_(0) {
}
@@ -47,7 +47,7 @@ void URLFetcher::Core::Start() {
DCHECK(request_context_) << "We need an URLRequestContext!";
io_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(
this, &Core::StartURLRequest),
- protect_entry_->UpdateBackoff(ProtectEntry::SEND));
+ protect_entry_->UpdateBackoff(URLFetcherProtectEntry::SEND));
}
void URLFetcher::Core::Stop() {
@@ -161,7 +161,8 @@ void URLFetcher::Core::OnCompletedURLRequest(const URLRequestStatus& status) {
if (response_code_ >= 500) {
// When encountering a server error, we will send the request again
// after backoff time.
- const int wait = protect_entry_->UpdateBackoff(ProtectEntry::FAILURE);
+ const int wait =
+ protect_entry_->UpdateBackoff(URLFetcherProtectEntry::FAILURE);
++num_retries_;
// Restarts the request if we still need to notify the delegate.
if (delegate_) {
@@ -174,7 +175,7 @@ void URLFetcher::Core::OnCompletedURLRequest(const URLRequestStatus& status) {
}
}
} else {
- protect_entry_->UpdateBackoff(ProtectEntry::SUCCESS);
+ protect_entry_->UpdateBackoff(URLFetcherProtectEntry::SUCCESS);
if (delegate_)
delegate_->OnURLFetchComplete(fetcher_, url_, status, response_code_,
cookies_, data_);