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

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

Issue 1414313002: Allow dynamic updating of authentication policies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix various build problems detected on bots. Created 5 years, 1 month 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
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 #include "net/http/url_security_manager.h" 5 #include "net/http/url_security_manager.h"
6 6
7 #include "net/http/http_auth_filter.h" 7 #include "net/http/http_auth_filter.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 12 matching lines...) Expand all
23 return whitelist_default_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); 23 return whitelist_default_->IsValid(auth_origin, HttpAuth::AUTH_SERVER);
24 return false; 24 return false;
25 } 25 }
26 26
27 bool URLSecurityManagerWhitelist::CanDelegate(const GURL& auth_origin) const { 27 bool URLSecurityManagerWhitelist::CanDelegate(const GURL& auth_origin) const {
28 if (whitelist_delegate_.get()) 28 if (whitelist_delegate_.get())
29 return whitelist_delegate_->IsValid(auth_origin, HttpAuth::AUTH_SERVER); 29 return whitelist_delegate_->IsValid(auth_origin, HttpAuth::AUTH_SERVER);
30 return false; 30 return false;
31 } 31 }
32 32
33 void URLSecurityManagerWhitelist::SetDefaultWhitelist(
34 const HttpAuthFilter* whitelist_default) {
35 whitelist_default_.reset(whitelist_default);
36 }
37
38 void URLSecurityManagerWhitelist::SetDelegateWhitelist(
39 const HttpAuthFilter* whitelist_delegate) {
40 whitelist_delegate_.reset(whitelist_delegate);
41 }
42
43 bool URLSecurityManagerWhitelist::HasDefaultWhitelist() const {
44 return whitelist_default_.get() == nullptr;
45 }
46
33 } // namespace net 47 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698