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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_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 // 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 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 delete loaders; 1745 delete loaders;
1746 } 1746 }
1747 1747
1748 ResourceDispatcherHostImpl::HttpAuthResourceType 1748 ResourceDispatcherHostImpl::HttpAuthResourceType
1749 ResourceDispatcherHostImpl::HttpAuthResourceTypeOf(net::URLRequest* request) { 1749 ResourceDispatcherHostImpl::HttpAuthResourceTypeOf(net::URLRequest* request) {
1750 // Use the same critera as for cookies to determine the sub-resource type 1750 // Use the same critera as for cookies to determine the sub-resource type
1751 // that is requesting to be authenticated. 1751 // that is requesting to be authenticated.
1752 if (!request->first_party_for_cookies().is_valid()) 1752 if (!request->first_party_for_cookies().is_valid())
1753 return HTTP_AUTH_RESOURCE_TOP; 1753 return HTTP_AUTH_RESOURCE_TOP;
1754 1754
1755 if (net::RegistryControlledDomainService::SameDomainOrHost( 1755 if (net::registry_controlled_domains::SameDomainOrHost(
1756 request->first_party_for_cookies(), request->url())) 1756 request->first_party_for_cookies(), request->url(),
1757 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES))
1757 return HTTP_AUTH_RESOURCE_SAME_DOMAIN; 1758 return HTTP_AUTH_RESOURCE_SAME_DOMAIN;
1758 1759
1759 if (allow_cross_origin_auth_prompt()) 1760 if (allow_cross_origin_auth_prompt())
1760 return HTTP_AUTH_RESOURCE_ALLOWED_CROSS; 1761 return HTTP_AUTH_RESOURCE_ALLOWED_CROSS;
1761 1762
1762 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; 1763 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS;
1763 } 1764 }
1764 1765
1765 bool ResourceDispatcherHostImpl::allow_cross_origin_auth_prompt() { 1766 bool ResourceDispatcherHostImpl::allow_cross_origin_auth_prompt() {
1766 return allow_cross_origin_auth_prompt_; 1767 return allow_cross_origin_auth_prompt_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 DelegateMap::iterator it = delegate_map_.find(id); 1805 DelegateMap::iterator it = delegate_map_.find(id);
1805 DCHECK(it->second->HasObserver(delegate)); 1806 DCHECK(it->second->HasObserver(delegate));
1806 it->second->RemoveObserver(delegate); 1807 it->second->RemoveObserver(delegate);
1807 if (it->second->size() == 0) { 1808 if (it->second->size() == 0) {
1808 delete it->second; 1809 delete it->second;
1809 delegate_map_.erase(it); 1810 delegate_map_.erase(it);
1810 } 1811 }
1811 } 1812 }
1812 1813
1813 } // namespace content 1814 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698