Index: chrome/browser/chromeos/gdata/gdata_contacts_service.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_contacts_service.h b/chrome/browser/chromeos/gdata/gdata_contacts_service.h |
index faf4434ead919d37ceb8a11e4b3dc0fbf5d83dcd..a6995c55aa907522e4bb5005c912fbd1a4466b00 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_contacts_service.h |
+++ b/chrome/browser/chromeos/gdata/gdata_contacts_service.h |
@@ -68,8 +68,11 @@ class GDataContactsService : public GDataContactsServiceInterface { |
GDataAuthService* auth_service_for_testing(); |
- void set_max_simultaneous_photo_downloads_for_testing(int max_downloads) { |
- max_simultaneous_photo_downloads_ = max_downloads; |
+ void set_max_photo_downloads_per_second_for_testing(int max_downloads) { |
+ max_photo_downloads_per_second_ = max_downloads; |
+ } |
+ void set_photo_download_timer_interval_for_testing(base::TimeDelta interval) { |
+ photo_download_timer_interval_ = interval; |
} |
void set_feed_url_for_testing(const GURL& url) { |
feed_url_for_testing_ = url; |
@@ -98,15 +101,20 @@ class GDataContactsService : public GDataContactsServiceInterface { |
// In-progress download requests. Pointers are owned by this class. |
std::set<DownloadContactsRequest*> requests_; |
+ // Maximum number of photos we'll try to download per second (per |
+ // DownloadContacts() request). |
+ int max_photo_downloads_per_second_; |
+ |
+ // Amount of time that we'll wait between waves of photo download requests. |
+ // This is usually one second (see |max_photo_downloads_per_second_|) but can |
+ // be set to a lower value for tests to make them complete more quickly. |
+ base::TimeDelta photo_download_timer_interval_; |
+ |
// If non-empty, URL that will be used to fetch the feed. URLs contained |
// within the feed will also be modified to use the host and port from this |
// member. |
GURL feed_url_for_testing_; |
- // Maximum number of photos we'll try to download at once (per |
- // DownloadContacts() request). |
- int max_simultaneous_photo_downloads_; |
- |
// Callback that's invoked to rewrite photo URLs for tests. |
// This is needed for tests that serve static feed data from a host/port |
// that's only known at runtime. |