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

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

Issue 1313863006: Add SiteIsolation.IsolateExtensions metrics and tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix "not not" Created 5 years, 3 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
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 net::HttpCache* cache = request_context->GetURLRequestContext()-> 163 net::HttpCache* cache = request_context->GetURLRequestContext()->
164 http_transaction_factory()->GetCache(); 164 http_transaction_factory()->GetCache();
165 if (cache) 165 if (cache)
166 cache->OnExternalCacheHit(url, http_method); 166 cache->OnExternalCacheHit(url, http_method);
167 } 167 }
168 168
169 // Helper function for retrieving all the sites in a frame tree. 169 // Helper function for retrieving all the sites in a frame tree.
170 bool CollectSites(BrowserContext* context, 170 bool CollectSites(BrowserContext* context,
171 std::set<GURL>* sites, 171 std::set<GURL>* sites,
172 FrameTreeNode* node) { 172 FrameTreeNode* node) {
173 // Record about:blank as a real (process-having) site only if the SiteInstance
174 // is unassigned. Do not otherwise depend on the siteinstance's site URL,
175 // since its value reflects the current process model, and this function
176 // should behave identically across all process models.
177 if (node->current_url() == GURL(url::kAboutBlankURL) &&
178 node->current_frame_host()->GetSiteInstance()->HasSite()) {
179 return true;
180 }
173 sites->insert(SiteInstance::GetSiteForURL(context, node->current_url())); 181 sites->insert(SiteInstance::GetSiteForURL(context, node->current_url()));
174 return true; 182 return true;
175 } 183 }
176 184
177 bool FindMatchingProcess(int render_process_id, 185 bool FindMatchingProcess(int render_process_id,
178 bool* did_match_process, 186 bool* did_match_process,
179 FrameTreeNode* node) { 187 FrameTreeNode* node) {
180 if (node->current_frame_host()->GetProcess()->GetID() == render_process_id) { 188 if (node->current_frame_host()->GetProcess()->GetID() == render_process_id) {
181 *did_match_process = true; 189 *did_match_process = true;
182 return false; 190 return false;
(...skipping 4438 matching lines...) Expand 10 before | Expand all | Expand 10 after
4621 return NULL; 4629 return NULL;
4622 } 4630 }
4623 4631
4624 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4632 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4625 force_disable_overscroll_content_ = force_disable; 4633 force_disable_overscroll_content_ = force_disable;
4626 if (view_) 4634 if (view_)
4627 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4635 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4628 } 4636 }
4629 4637
4630 } // namespace content 4638 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698