Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1300)

Unified Diff: chrome/browser/net/sdch_dictionary_fetcher.h

Issue 20254: Fetch SDCH dictionary as soon as current URL fetch completes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « no previous file | chrome/browser/net/sdch_dictionary_fetcher.cc » ('j') | net/url_request/url_request_http_job.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698