Commit 2f93829d authored by rlp@chromium.org's avatar rlp@chromium.org

[Profiles, SyzyASAN] Remove incorrect use of profile_ on the IO thread.

BUG=290974

Review URL: https://codereview.chromium.org/49003003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233502 0039d316-1c4b-4281-b951-d872f2087c98
parent 65853274
...@@ -87,6 +87,7 @@ ChromeRenderMessageFilter::ChromeRenderMessageFilter( ...@@ -87,6 +87,7 @@ ChromeRenderMessageFilter::ChromeRenderMessageFilter(
: render_process_id_(render_process_id), : render_process_id_(render_process_id),
profile_(profile), profile_(profile),
off_the_record_(profile_->IsOffTheRecord()), off_the_record_(profile_->IsOffTheRecord()),
predictor_(profile_->GetNetworkPredictor()),
request_context_(request_context), request_context_(request_context),
extension_info_map_( extension_info_map_(
extensions::ExtensionSystem::Get(profile)->info_map()), extensions::ExtensionSystem::Get(profile)->info_map()),
...@@ -202,13 +203,13 @@ net::HostResolver* ChromeRenderMessageFilter::GetHostResolver() { ...@@ -202,13 +203,13 @@ net::HostResolver* ChromeRenderMessageFilter::GetHostResolver() {
void ChromeRenderMessageFilter::OnDnsPrefetch( void ChromeRenderMessageFilter::OnDnsPrefetch(
const std::vector<std::string>& hostnames) { const std::vector<std::string>& hostnames) {
if (profile_->GetNetworkPredictor()) if (predictor_)
profile_->GetNetworkPredictor()->DnsPrefetchList(hostnames); predictor_->DnsPrefetchList(hostnames);
} }
void ChromeRenderMessageFilter::OnPreconnect(const GURL& url) { void ChromeRenderMessageFilter::OnPreconnect(const GURL& url) {
if (profile_->GetNetworkPredictor()) if (predictor_)
profile_->GetNetworkPredictor()->PreconnectUrl( predictor_->PreconnectUrl(
url, GURL(), chrome_browser_net::UrlInfo::MOUSE_OVER_MOTIVATED, 1); url, GURL(), chrome_browser_net::UrlInfo::MOUSE_OVER_MOTIVATED, 1);
} }
......
...@@ -195,6 +195,9 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter { ...@@ -195,6 +195,9 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
Profile* profile_; Profile* profile_;
// Copied from the profile so that it can be read on the IO thread. // Copied from the profile so that it can be read on the IO thread.
bool off_the_record_; bool off_the_record_;
// The Predictor for the associated Profile. It is stored so that it can be
// used on the IO thread.
chrome_browser_net::Predictor* predictor_;
scoped_refptr<net::URLRequestContextGetter> request_context_; scoped_refptr<net::URLRequestContextGetter> request_context_;
scoped_refptr<ExtensionInfoMap> extension_info_map_; scoped_refptr<ExtensionInfoMap> extension_info_map_;
// Used to look up permissions at database creation time. // Used to look up permissions at database creation time.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment