diff options
author | gavinp@google.com <gavinp@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-01 01:02:57 +0000 |
---|---|---|
committer | gavinp@google.com <gavinp@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-01 01:02:57 +0000 |
commit | 96d630012d7e22411dcf0852d638feba1063f126 (patch) | |
tree | 6bd5c128527baa09a35306c761a8cedc11e72ec4 | |
parent | 4c4988d34da6e44b5bb7ae11a000a4c324986c8a (diff) | |
download | chromium_src-96d630012d7e22411dcf0852d638feba1063f126.zip chromium_src-96d630012d7e22411dcf0852d638feba1063f126.tar.gz chromium_src-96d630012d7e22411dcf0852d638feba1063f126.tar.bz2 |
Make prefetching default to disabled
My earlier CL jumped the gun a bit; prefetching isn't ready to be the default,
so this CL reverses that. Now you have to explicitly turn prefetching on to have it.
Note that prefetching was never enabled in trunk: because I haven't yet flipped the
build default for webkit to include prefetching, the command line flag had no effect
on trunk chrome.
BUG=none
TEST=chrome --enable-prefetch http://gemal.dk/browserspy/prefetch.php
Review URL: http://codereview.chromium.org/2847093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54485 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 92e8514..bbdc32b 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -126,7 +126,7 @@ bool ShouldServiceRequest(ChildProcessInfo::ProcessType process_type, return true; if (request_data.resource_type == ResourceType::PREFETCH && - CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePrefetch)) + !CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePrefetch)) return false; ChildProcessSecurityPolicy* policy = diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index e6aa0ca..15a3ae5 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -374,6 +374,11 @@ const char kEnableNativeWebWorkers[] = "enable-native-web-workers"; // Enable speculative TCP/IP preconnection. const char kEnablePreconnect[] = "enable-preconnect"; +// Enable requests that webkit labels TargetIsPrefetch. As of +// writing only <link rel=prefetch...> but also eventually +// Link: headers. +const char kEnablePrefetch[] = "enable-prefetch"; + // Enable caching of pre-parsed JS script data. See http://crbug.com/32407. const char kEnablePreparsedJsCaching[] = "enable-preparsed-js-caching"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 573e6bb..795942a 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -120,8 +120,9 @@ extern const char kEnableMemoryInfo[]; extern const char kEnableMonitorProfile[]; extern const char kEnableNaCl[]; extern const char kEnableNativeWebWorkers[]; -extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePreconnect[]; +extern const char kEnablePrefetch[]; +extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePrintPreview[]; extern const char kEnableSearchProviderApiV2[]; extern const char kEnableSpeechInput[]; |