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

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

Issue 15140003: Add support for split Public Suffix List distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again 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 2905 matching lines...) Expand 10 before | Expand all | Expand 10 after
2916 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 2916 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
2917 bool force_swap_due_to_flag = 2917 bool force_swap_due_to_flag =
2918 command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || 2918 command_line.HasSwitch(switches::kEnableStrictSiteIsolation) ||
2919 command_line.HasSwitch(switches::kSitePerProcess); 2919 command_line.HasSwitch(switches::kSitePerProcess);
2920 if (force_swap_due_to_flag && 2920 if (force_swap_due_to_flag &&
2921 !frame->parent() && (is_content_initiated || is_redirect)) { 2921 !frame->parent() && (is_content_initiated || is_redirect)) {
2922 WebString origin_str = frame->document().securityOrigin().toString(); 2922 WebString origin_str = frame->document().securityOrigin().toString();
2923 GURL frame_url(origin_str.utf8().data()); 2923 GURL frame_url(origin_str.utf8().data());
2924 // TODO(cevans): revisit whether this site check is still necessary once 2924 // TODO(cevans): revisit whether this site check is still necessary once
2925 // crbug.com/101395 is fixed. 2925 // crbug.com/101395 is fixed.
2926 if (!net::RegistryControlledDomainService::SameDomainOrHost(frame_url, 2926 bool same_domain_or_host =
2927 url) || 2927 net::registry_controlled_domains::SameDomainOrHost(
2928 frame_url.scheme() != url.scheme()) { 2928 frame_url,
2929 url,
2930 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
2931 if (!same_domain_or_host || frame_url.scheme() != url.scheme()) {
2929 OpenURL(frame, url, referrer, default_policy); 2932 OpenURL(frame, url, referrer, default_policy);
2930 return WebKit::WebNavigationPolicyIgnore; 2933 return WebKit::WebNavigationPolicyIgnore;
2931 } 2934 }
2932 } 2935 }
2933 2936
2934 // If the browser is interested, then give it a chance to look at the request. 2937 // If the browser is interested, then give it a chance to look at the request.
2935 if (is_content_initiated) { 2938 if (is_content_initiated) {
2936 bool browser_handles_request = 2939 bool browser_handles_request =
2937 renderer_preferences_.browser_handles_non_local_top_level_requests && 2940 renderer_preferences_.browser_handles_non_local_top_level_requests &&
2938 IsNonLocalTopLevelNavigation(url, frame, type); 2941 IsNonLocalTopLevelNavigation(url, frame, type);
(...skipping 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after
6528 WebURL url = icon_urls[i].iconURL(); 6531 WebURL url = icon_urls[i].iconURL();
6529 if (!url.isEmpty()) 6532 if (!url.isEmpty())
6530 urls.push_back(FaviconURL(url, 6533 urls.push_back(FaviconURL(url,
6531 ToFaviconType(icon_urls[i].iconType()))); 6534 ToFaviconType(icon_urls[i].iconType())));
6532 } 6535 }
6533 SendUpdateFaviconURL(urls); 6536 SendUpdateFaviconURL(urls);
6534 } 6537 }
6535 6538
6536 6539
6537 } // namespace content 6540 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/worker_host/worker_process_host.cc ('k') | net/base/registry_controlled_domains/effective_tld_names.dat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698