Index: net/spdy/spdy_config_service.h |
=================================================================== |
--- net/spdy/spdy_config_service.h (revision 0) |
+++ net/spdy/spdy_config_service.h (revision 0) |
@@ -0,0 +1,47 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NET_SPDY_SPDY_CONFIG_SERVICE_H_ |
+#define NET_SPDY_SPDY_CONFIG_SERVICE_H_ |
+#pragma once |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/string_piece.h" |
+#include "net/base/net_export.h" |
+ |
+namespace net { |
+ |
+// A collection of SPDY related configuration settings. |
+struct NET_EXPORT SpdyConfig { |
+ SpdyConfig(); |
+ ~SpdyConfig(); |
+ |
+ std::string spdy_servers; |
+}; |
+ |
+// The interface for retrieving the SPDY configuration. |
+class NET_EXPORT SpdyConfigService |
+ : public base::RefCountedThreadSafe<SpdyConfigService> { |
willchan no longer on Chromium
2011/09/02 22:31:13
SpdyConfigService should not be refcounted. I'll l
ramant (doing other things)
2011/09/14 20:15:57
Done.
|
+ public: |
+ SpdyConfigService(); |
+ |
+ // May not be thread-safe, should only be called on the IO thread. |
+ virtual void GetSpdyConfig(SpdyConfig* config) = 0; |
willchan no longer on Chromium
2011/09/02 22:31:13
We plan to use this class in HttpStreamFactoryImpl
ramant (doing other things)
2011/09/14 20:15:57
Done.
|
+ |
+ // Add |spdy_server| into the persisitent store. Should only be called from IO |
+ // thread. |
+ virtual void AddSpdyServer(const std::string& server) = 0; |
willchan no longer on Chromium
2011/09/02 22:31:13
Instead of this, we probably want a virtual void S
ramant (doing other things)
2011/09/14 20:15:57
Done.
|
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<SpdyConfigService>; |
+ |
+ virtual ~SpdyConfigService(); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_SPDY_SPDY_CONFIG_SERVICE_H_ |