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

Side by Side Diff: net/base/transport_security_state.h

Issue 2869024: Add virtual to some base classes that have virtual methods... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « base/message_loop_proxy.h ('k') | net/url_request/https_prober.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_BASE_TRANSPORT_SECURITY_STATE_H_ 5 #ifndef NET_BASE_TRANSPORT_SECURITY_STATE_H_
6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_ 6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // parameters are not modified if the function returns |false|. 73 // parameters are not modified if the function returns |false|.
74 static bool ParseHeader(const std::string& value, 74 static bool ParseHeader(const std::string& value,
75 int* max_age, 75 int* max_age,
76 bool* include_subdomains); 76 bool* include_subdomains);
77 77
78 class Delegate { 78 class Delegate {
79 public: 79 public:
80 // This function may not block and may be called with internal locks held. 80 // This function may not block and may be called with internal locks held.
81 // Thus it must not reenter the TransportSecurityState object. 81 // Thus it must not reenter the TransportSecurityState object.
82 virtual void StateIsDirty(TransportSecurityState* state) = 0; 82 virtual void StateIsDirty(TransportSecurityState* state) = 0;
83
84 protected:
85 virtual ~Delegate() {}
83 }; 86 };
84 87
85 void SetDelegate(Delegate*); 88 void SetDelegate(Delegate*);
86 89
87 bool Serialise(std::string* output); 90 bool Serialise(std::string* output);
88 bool Deserialise(const std::string& state, bool* dirty); 91 bool Deserialise(const std::string& state, bool* dirty);
89 92
90 private: 93 private:
91 friend class base::RefCountedThreadSafe<TransportSecurityState>; 94 friend class base::RefCountedThreadSafe<TransportSecurityState>;
92 FRIEND_TEST(TransportSecurityStateTest, IsPreloaded); 95 FRIEND_TEST(TransportSecurityStateTest, IsPreloaded);
(...skipping 15 matching lines...) Expand all
108 static std::string CanonicaliseHost(const std::string& host); 111 static std::string CanonicaliseHost(const std::string& host);
109 static bool isPreloadedSTS(const std::string& canonicalised_host, 112 static bool isPreloadedSTS(const std::string& canonicalised_host,
110 bool* out_include_subdomains); 113 bool* out_include_subdomains);
111 114
112 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 115 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
113 }; 116 };
114 117
115 } // namespace net 118 } // namespace net
116 119
117 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ 120 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « base/message_loop_proxy.h ('k') | net/url_request/https_prober.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698