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

Side by Side Diff: net/http/url_security_manager.h

Issue 6248021: Reapply r72562 with willchan's nits + locally tested shlib fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix path Created 9 years, 11 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
« no previous file with comments | « net/http/mock_allow_url_security_manager.cc ('k') | net/net.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef NET_HTTP_URL_SECURITY_MANAGER_H_ 5 #ifndef NET_HTTP_URL_SECURITY_MANAGER_H_
6 #define NET_HTTP_URL_SECURITY_MANAGER_H_ 6 #define NET_HTTP_URL_SECURITY_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const; 67 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const;
68 virtual bool CanDelegate(const GURL& auth_origin) const; 68 virtual bool CanDelegate(const GURL& auth_origin) const;
69 69
70 private: 70 private:
71 scoped_ptr<const HttpAuthFilter> whitelist_default_; 71 scoped_ptr<const HttpAuthFilter> whitelist_default_;
72 scoped_ptr<const HttpAuthFilter> whitelist_delegate_; 72 scoped_ptr<const HttpAuthFilter> whitelist_delegate_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWhitelist); 74 DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWhitelist);
75 }; 75 };
76 76
77 #if defined(UNIT_TEST)
78 // An URLSecurityManager which is very permissive.
79 class URLSecurityManagerAllow : public URLSecurityManager {
80 public:
81 URLSecurityManagerAllow() {}
82 virtual ~URLSecurityManagerAllow() {}
83
84 virtual bool CanUseDefaultCredentials(const GURL& auth_origin) const {
85 return true;
86 }
87 virtual bool CanDelegate(const GURL& auth_origin) const {
88 return true;
89 }
90
91 private:
92 DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerAllow);
93 };
94 #endif // defined(UNIT_TEST)
95
96 } // namespace net 77 } // namespace net
97 78
98 #endif // NET_HTTP_URL_SECURITY_MANAGER_H_ 79 #endif // NET_HTTP_URL_SECURITY_MANAGER_H_
OLDNEW
« no previous file with comments | « net/http/mock_allow_url_security_manager.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698