summaryrefslogtreecommitdiffstats
path: root/chrome/browser/url_fetcher_protect.h
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_protect.h
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_protect.h')
-rw-r--r--chrome/browser/url_fetcher_protect.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/url_fetcher_protect.h b/chrome/browser/url_fetcher_protect.h
index 238d307..6e4080d 100644
--- a/chrome/browser/url_fetcher_protect.h
+++ b/chrome/browser/url_fetcher_protect.h
@@ -33,7 +33,7 @@
// maximum backoff time (when backoff > maximum backoff time)
//
// where |k| is the multiplier, and |c| is the constant factor.
-class ProtectEntry {
+class URLFetcherProtectEntry {
public:
enum EventType {
SEND, // request will be sent out
@@ -41,14 +41,14 @@ class ProtectEntry {
FAILURE // no response or error
};
- ProtectEntry();
- ProtectEntry(int sliding_window_period, int max_send_threshold,
- int max_retries, int initial_timeout,
- double multiplier, int constant_factor,
- int maximum_timeout);
+ URLFetcherProtectEntry();
+ URLFetcherProtectEntry(int sliding_window_period, int max_send_threshold,
+ int max_retries, int initial_timeout,
+ double multiplier, int constant_factor,
+ int maximum_timeout);
- virtual ~ProtectEntry() { }
+ virtual ~URLFetcherProtectEntry() { }
// When a connection event happens, log it to the queue, and recalculate
// the timeout period. It returns the backoff time, in milliseconds, that
@@ -110,36 +110,36 @@ class ProtectEntry {
// there are too many requests sent in sliding window.
std::queue<TimeTicks> send_log_;
- DISALLOW_EVIL_CONSTRUCTORS(ProtectEntry);
+ DISALLOW_COPY_AND_ASSIGN(URLFetcherProtectEntry);
};
// This singleton class is used to manage all protect entries.
// Now we use the host name as service id.
-class ProtectManager {
+class URLFetcherProtectManager {
public:
- ~ProtectManager();
+ ~URLFetcherProtectManager();
// Returns the global instance of this class.
- static ProtectManager* GetInstance();
+ static URLFetcherProtectManager* GetInstance();
// Registers a new entry in this service. If the entry already exists,
// just returns it.
- ProtectEntry* Register(std::string id);
+ URLFetcherProtectEntry* Register(std::string id);
// Always registers the entry even when it exists.
- ProtectEntry* Register(std::string id, ProtectEntry* entry);
+ URLFetcherProtectEntry* Register(std::string id,
+ URLFetcherProtectEntry* entry);
private:
- ProtectManager() { }
+ URLFetcherProtectManager() { }
- typedef std::map<const std::string, ProtectEntry*> ProtectService;
+ typedef std::map<const std::string, URLFetcherProtectEntry*> ProtectService;
static Lock lock_;
- static scoped_ptr<ProtectManager> protect_manager_;
+ static scoped_ptr<URLFetcherProtectManager> protect_manager_;
ProtectService services_;
- DISALLOW_EVIL_CONSTRUCTORS(ProtectManager);
+ DISALLOW_COPY_AND_ASSIGN(URLFetcherProtectManager);
};
#endif // CHROME_BROWSER_URL_FETCHER_PROTECT_H__
-