Index: chrome/browser/net/sdch_dictionary_fetcher.h |
=================================================================== |
--- chrome/browser/net/sdch_dictionary_fetcher.h (revision 9302) |
+++ chrome/browser/net/sdch_dictionary_fetcher.h (working copy) |
@@ -13,6 +13,7 @@ |
#include <string> |
#include "base/compiler_specific.h" |
+#include "base/scoped_ptr.h" |
#include "base/task.h" |
#include "chrome/browser/net/url_fetcher.h" |
#include "net/base/sdch_manager.h" |
@@ -20,7 +21,7 @@ |
class SdchDictionaryFetcher : public URLFetcher::Delegate, |
public SdchFetcher { |
public: |
- SdchDictionaryFetcher() : |
+ SdchDictionaryFetcher() : |
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
task_is_pending_(false) {} |
virtual ~SdchDictionaryFetcher() {} |
@@ -31,8 +32,11 @@ |
virtual void Schedule(const GURL& dictionary_url); |
private: |
- // Delay between Schedule and actual download. |
- static const int kMsDelayFromRequestTillDownload = 15000; |
+ // Delay in ms between Schedule and actual download. |
+ // This leaves the URL in a queue, which is de-duped, so that there is less |
+ // chance we'll try to load the same URL multiple times when a pile of |
+ // page subresources (or tabs opened in parallel) all suggest the dictionary. |
+ static const int kMsDelayFromRequestTillDownload = 100; |
// Ensure the download after the above delay. |
void ScheduleDelayedRun(); |