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

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: Attempt to fix clang compile warning. 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 not otherwise depend on the siteinstance's site URL,
nasko 2015/09/04 22:19:43 nit: double not, SiteInstance
ncarter (slow) 2015/09/10 19:08:59 Done.
175 // since it's value reflects the current process model, and this function
nasko 2015/09/04 22:19:43 nit: its
ncarter (slow) 2015/09/10 19:08:59 Done.
176 // ought to 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 4426 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 player_map->erase(it); 4617 player_map->erase(it);
4610 } 4618 }
4611 4619
4612 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4620 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4613 force_disable_overscroll_content_ = force_disable; 4621 force_disable_overscroll_content_ = force_disable;
4614 if (view_) 4622 if (view_)
4615 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4623 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4616 } 4624 }
4617 4625
4618 } // namespace content 4626 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698