| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // TODO(rdsmith): This class needs to delegate URLRequest::Delegate methods | 5 // TODO(rdsmith): This class needs to delegate URLRequest::Delegate methods |
| 6 // to the net/ embedder for correct implementation of authentication. | 6 // to the net/ embedder for correct implementation of authentication. |
| 7 // Specifically, this class needs the embedder to provide functionality | 7 // Specifically, this class needs the embedder to provide functionality |
| 8 // corresponding to | 8 // corresponding to |
| 9 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested}. | 9 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested}. |
| 10 | 10 |
| 11 #ifndef NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ | 11 #ifndef NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ |
| 12 #define NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ | 12 #define NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 | 16 |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
| 20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
| 21 #include "net/base/sdch_manager.h" | 21 #include "net/base/sdch_manager.h" |
| 22 #include "net/url_request/url_fetcher_delegate.h" | 22 #include "net/url_request/url_fetcher_delegate.h" |
| 23 #include "net/url_request/url_request.h" | 23 #include "net/url_request/url_request.h" |
| 24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 | 27 |
| 28 class NetLogWithSource; | 28 class NetLogWithSource; |
| 29 class URLRequest; | 29 class URLRequest; |
| 30 class URLRequestThrottlerEntryInterface; | |
| 31 | 30 |
| 32 // This class is used by embedder SDCH policy object to fetch | 31 // This class is used by embedder SDCH policy object to fetch |
| 33 // dictionaries. It queues requests for dictionaries and dispatches | 32 // dictionaries. It queues requests for dictionaries and dispatches |
| 34 // them serially, implementing the URLRequest::Delegate interface to | 33 // them serially, implementing the URLRequest::Delegate interface to |
| 35 // handle callbacks (but see above TODO). It tracks all requests, only | 34 // handle callbacks (but see above TODO). It tracks all requests, only |
| 36 // attempting to fetch each dictionary once. | 35 // attempting to fetch each dictionary once. |
| 37 class NET_EXPORT SdchDictionaryFetcher : public URLRequest::Delegate, | 36 class NET_EXPORT SdchDictionaryFetcher : public URLRequest::Delegate, |
| 38 public base::NonThreadSafe { | 37 public base::NonThreadSafe { |
| 39 public: | 38 public: |
| 40 typedef base::Callback<void(const std::string& dictionary_text, | 39 typedef base::Callback<void(const std::string& dictionary_text, |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Store the URLRequestContext associated with the owning SdchManager for | 120 // Store the URLRequestContext associated with the owning SdchManager for |
| 122 // use while fetching. | 121 // use while fetching. |
| 123 URLRequestContext* const context_; | 122 URLRequestContext* const context_; |
| 124 | 123 |
| 125 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); | 124 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 } // namespace net | 127 } // namespace net |
| 129 | 128 |
| 130 #endif // NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ | 129 #endif // NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ |
| OLD | NEW |