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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 977193003: Fix assumption: HttpTransactionFactory::GetCache() may return NULL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 url, 145 url,
146 is_favicon, 146 is_favicon,
147 max_bitmap_size)); 147 max_bitmap_size));
148 return g_next_image_download_id; 148 return g_next_image_download_id;
149 } 149 }
150 150
151 void NotifyCacheOnIO( 151 void NotifyCacheOnIO(
152 scoped_refptr<net::URLRequestContextGetter> request_context, 152 scoped_refptr<net::URLRequestContextGetter> request_context,
153 const GURL& url, 153 const GURL& url,
154 const std::string& http_method) { 154 const std::string& http_method) {
155 request_context->GetURLRequestContext()->http_transaction_factory()-> 155 net::HttpCache* cache = request_context->GetURLRequestContext()->
156 GetCache()->OnExternalCacheHit(url, http_method); 156 http_transaction_factory()->GetCache();
157 if (cache)
158 cache->OnExternalCacheHit(url, http_method);
157 } 159 }
158 160
159 // Helper function for retrieving all the sites in a frame tree. 161 // Helper function for retrieving all the sites in a frame tree.
160 bool CollectSites(BrowserContext* context, 162 bool CollectSites(BrowserContext* context,
161 std::set<GURL>* sites, 163 std::set<GURL>* sites,
162 FrameTreeNode* node) { 164 FrameTreeNode* node) {
163 sites->insert(SiteInstance::GetSiteForURL(context, node->current_url())); 165 sites->insert(SiteInstance::GetSiteForURL(context, node->current_url()));
164 return true; 166 return true;
165 } 167 }
166 168
(...skipping 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after
4535 node->render_manager()->ResumeResponseDeferredAtStart(); 4537 node->render_manager()->ResumeResponseDeferredAtStart();
4536 } 4538 }
4537 4539
4538 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4540 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4539 force_disable_overscroll_content_ = force_disable; 4541 force_disable_overscroll_content_ = force_disable;
4540 if (view_) 4542 if (view_)
4541 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4543 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4542 } 4544 }
4543 4545
4544 } // namespace content 4546 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698