diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 01:30:46 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 01:30:46 +0000 |
commit | 67372ecfa788fa29193f94029f9eccac2c08af0f (patch) | |
tree | e99301edd0e3b874600d3fbcdede208e35adcbdb /chrome/browser/browser_about_handler.cc | |
parent | 29adff69903acfae6aca00ba41b185d143f57f35 (diff) | |
download | chromium_src-67372ecfa788fa29193f94029f9eccac2c08af0f.zip chromium_src-67372ecfa788fa29193f94029f9eccac2c08af0f.tar.gz chromium_src-67372ecfa788fa29193f94029f9eccac2c08af0f.tar.bz2 |
Modifying prefetch to account for multi-profile.
Items of note:
- predictor_api is gone. Most functions in predictor_api.cc have moved into the chrome_browser_net::Predictor class or the Profile class.
- The predictor state is cleaned up in the Profile dtor.
- Predictor is owned by the ProfileIOData of the profile.
- InitialObserver class is gone since each profile keeps their own info, the non-OTR don't care if anyone is OTR.
- Predictor is created by the profile and then passed to the ProfileIOData. Then its initialization is finished on the IOThread.
- ConnectInterceptor now subclasses off of UrlRequestJobFactory::Interceptor.
- Updated Profile to create a SimpleShutdownPredictor with limited functionality when in unittests.
BUG=89937,90114
TEST=passes existing
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97446
Review URL: http://codereview.chromium.org/7467012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index aeb75e5..1574cf5 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -30,7 +30,7 @@ #include "chrome/browser/defaults.h" #include "chrome/browser/memory_details.h" #include "chrome/browser/metrics/histogram_synchronizer.h" -#include "chrome/browser/net/predictor_api.h" +#include "chrome/browser/net/predictor.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/plugin_prefs.h" #include "chrome/browser/profiles/profile.h" @@ -726,18 +726,20 @@ class AboutDnsHandler : public base::RefCountedThreadSafe<AboutDnsHandler> { // Calls FinishOnUIThread() on completion. void StartOnUIThread() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + chrome_browser_net::Predictor* predictor = + source_->profile()->GetNetworkPredictor(); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(this, &AboutDnsHandler::StartOnIOThread)); + NewRunnableMethod(this, &AboutDnsHandler::StartOnIOThread, predictor)); } - void StartOnIOThread() { + void StartOnIOThread(chrome_browser_net::Predictor* predictor) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); std::string data; AppendHeader(&data, 0, "About DNS"); AppendBody(&data); - chrome_browser_net::PredictorGetHtmlInfo(&data); + chrome_browser_net::Predictor::PredictorGetHtmlInfo(predictor, &data); AppendFooter(&data); BrowserThread::PostTask( |