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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 delete loaders; 1798 delete loaders;
1799 } 1799 }
1800 1800
1801 ResourceDispatcherHostImpl::HttpAuthResourceType 1801 ResourceDispatcherHostImpl::HttpAuthResourceType
1802 ResourceDispatcherHostImpl::HttpAuthResourceTypeOf(net::URLRequest* request) { 1802 ResourceDispatcherHostImpl::HttpAuthResourceTypeOf(net::URLRequest* request) {
1803 // Use the same critera as for cookies to determine the sub-resource type 1803 // Use the same critera as for cookies to determine the sub-resource type
1804 // that is requesting to be authenticated. 1804 // that is requesting to be authenticated.
1805 if (!request->first_party_for_cookies().is_valid()) 1805 if (!request->first_party_for_cookies().is_valid())
1806 return HTTP_AUTH_RESOURCE_TOP; 1806 return HTTP_AUTH_RESOURCE_TOP;
1807 1807
1808 if (net::RegistryControlledDomainService::SameDomainOrHost( 1808 if (net::registry_controlled_domains::SameDomainOrHost(
1809 request->first_party_for_cookies(), request->url())) 1809 request->first_party_for_cookies(), request->url(),
1810 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES))
1810 return HTTP_AUTH_RESOURCE_SAME_DOMAIN; 1811 return HTTP_AUTH_RESOURCE_SAME_DOMAIN;
1811 1812
1812 if (allow_cross_origin_auth_prompt()) 1813 if (allow_cross_origin_auth_prompt())
1813 return HTTP_AUTH_RESOURCE_ALLOWED_CROSS; 1814 return HTTP_AUTH_RESOURCE_ALLOWED_CROSS;
1814 1815
1815 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; 1816 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS;
1816 } 1817 }
1817 1818
1818 bool ResourceDispatcherHostImpl::allow_cross_origin_auth_prompt() { 1819 bool ResourceDispatcherHostImpl::allow_cross_origin_auth_prompt() {
1819 return allow_cross_origin_auth_prompt_; 1820 return allow_cross_origin_auth_prompt_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 DelegateMap::iterator it = delegate_map_.find(id); 1858 DelegateMap::iterator it = delegate_map_.find(id);
1858 DCHECK(it->second->HasObserver(delegate)); 1859 DCHECK(it->second->HasObserver(delegate));
1859 it->second->RemoveObserver(delegate); 1860 it->second->RemoveObserver(delegate);
1860 if (it->second->size() == 0) { 1861 if (it->second->size() == 0) {
1861 delete it->second; 1862 delete it->second;
1862 delegate_map_.erase(it); 1863 delegate_map_.erase(it);
1863 } 1864 }
1864 } 1865 }
1865 1866
1866 } // namespace content 1867 } // namespace content
OLDNEW
« no previous file with comments | « chrome_frame/ready_mode/ready_mode.cc ('k') | content/browser/net/sqlite_persistent_cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698