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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 13979002: Add support for split PSL list distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added const modifiers Created 7 years, 7 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 | Annotate | Revision Log
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 2911 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
2912 bool force_swap_due_to_flag = 2912 bool force_swap_due_to_flag =
2913 command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || 2913 command_line.HasSwitch(switches::kEnableStrictSiteIsolation) ||
2914 command_line.HasSwitch(switches::kSitePerProcess); 2914 command_line.HasSwitch(switches::kSitePerProcess);
2915 if (force_swap_due_to_flag && 2915 if (force_swap_due_to_flag &&
2916 !frame->parent() && (is_content_initiated || is_redirect)) { 2916 !frame->parent() && (is_content_initiated || is_redirect)) {
2917 WebString origin_str = frame->document().securityOrigin().toString(); 2917 WebString origin_str = frame->document().securityOrigin().toString();
2918 GURL frame_url(origin_str.utf8().data()); 2918 GURL frame_url(origin_str.utf8().data());
2919 // TODO(cevans): revisit whether this site check is still necessary once 2919 // TODO(cevans): revisit whether this site check is still necessary once
2920 // crbug.com/101395 is fixed. 2920 // crbug.com/101395 is fixed.
2921 if (!net::RegistryControlledDomainService::SameDomainOrHost(frame_url, 2921 bool same_domain_or_host =
2922 url) || 2922 net::registry_controlled_domains::SameDomainOrHost(
2923 frame_url.scheme() != url.scheme()) { 2923 frame_url,
2924 url,
2925 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
2926 if (!same_domain_or_host || frame_url.scheme() != url.scheme()) {
2924 OpenURL(frame, url, referrer, default_policy); 2927 OpenURL(frame, url, referrer, default_policy);
2925 return WebKit::WebNavigationPolicyIgnore; 2928 return WebKit::WebNavigationPolicyIgnore;
2926 } 2929 }
2927 } 2930 }
2928 2931
2929 // If the browser is interested, then give it a chance to look at the request. 2932 // If the browser is interested, then give it a chance to look at the request.
2930 if (is_content_initiated) { 2933 if (is_content_initiated) {
2931 bool browser_handles_request = 2934 bool browser_handles_request =
2932 renderer_preferences_.browser_handles_non_local_top_level_requests && 2935 renderer_preferences_.browser_handles_non_local_top_level_requests &&
2933 IsNonLocalTopLevelNavigation(url, frame, type); 2936 IsNonLocalTopLevelNavigation(url, frame, type);
(...skipping 3595 matching lines...) Expand 10 before | Expand all | Expand 10 after
6529 WebURL url = icon_urls[i].iconURL(); 6532 WebURL url = icon_urls[i].iconURL();
6530 if (!url.isEmpty()) 6533 if (!url.isEmpty())
6531 urls.push_back(FaviconURL(url, 6534 urls.push_back(FaviconURL(url,
6532 ToFaviconType(icon_urls[i].iconType()))); 6535 ToFaviconType(icon_urls[i].iconType())));
6533 } 6536 }
6534 SendUpdateFaviconURL(urls); 6537 SendUpdateFaviconURL(urls);
6535 } 6538 }
6536 6539
6537 6540
6538 } // namespace content 6541 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698