Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_SPDY_SPDY_CONFIG_SERVICE_H_ | |
| 6 #define NET_SPDY_SPDY_CONFIG_SERVICE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/memory/ref_counted.h" | |
| 13 #include "base/string_piece.h" | |
| 14 #include "net/base/net_export.h" | |
| 15 | |
| 16 namespace net { | |
| 17 | |
| 18 // A collection of SPDY related configuration settings. | |
| 19 struct NET_EXPORT SpdyConfig { | |
| 20 SpdyConfig(); | |
| 21 ~SpdyConfig(); | |
| 22 | |
| 23 std::string spdy_servers; | |
| 24 }; | |
| 25 | |
| 26 // The interface for retrieving the SPDY configuration. | |
| 27 class NET_EXPORT SpdyConfigService | |
| 28 : 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.
| |
| 29 public: | |
| 30 SpdyConfigService(); | |
| 31 | |
| 32 // May not be thread-safe, should only be called on the IO thread. | |
| 33 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.
| |
| 34 | |
| 35 // Add |spdy_server| into the persisitent store. Should only be called from IO | |
| 36 // thread. | |
| 37 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.
| |
| 38 | |
| 39 protected: | |
| 40 friend class base::RefCountedThreadSafe<SpdyConfigService>; | |
| 41 | |
| 42 virtual ~SpdyConfigService(); | |
| 43 }; | |
| 44 | |
| 45 } // namespace net | |
| 46 | |
| 47 #endif // NET_SPDY_SPDY_CONFIG_SERVICE_H_ | |
| OLD | NEW |