| 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 be moved out to the net/ embedder and | 5 // TODO(rdsmith): This class needs to be moved out to the net/ embedder and |
| 6 // hooked into whatever mechanisms the embedder uses for authentication. | 6 // hooked into whatever mechanisms the embedder uses for authentication. |
| 7 // Specifically, this class needs methods overriding | 7 // Specifically, this class needs methods overriding |
| 8 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested} and can't | 8 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested} and can't |
| 9 // implement them at the net/ layer. | 9 // implement them at the net/ layer. |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 public URLRequest::Delegate, | 37 public URLRequest::Delegate, |
| 38 public base::NonThreadSafe { | 38 public base::NonThreadSafe { |
| 39 public: | 39 public: |
| 40 // The consumer must guarantee that |*consumer| and |*context| outlive | 40 // The consumer must guarantee that |*consumer| and |*context| outlive |
| 41 // this object. | 41 // this object. |
| 42 SdchDictionaryFetcher(SdchFetcher::Delegate* consumer, | 42 SdchDictionaryFetcher(SdchFetcher::Delegate* consumer, |
| 43 URLRequestContext* context); | 43 URLRequestContext* context); |
| 44 virtual ~SdchDictionaryFetcher(); | 44 virtual ~SdchDictionaryFetcher(); |
| 45 | 45 |
| 46 // Implementation of SdchFetcher methods. | 46 // Implementation of SdchFetcher methods. |
| 47 virtual void Schedule(const GURL& dictionary_url) OVERRIDE; | 47 virtual void Schedule(const GURL& dictionary_url) override; |
| 48 virtual void Cancel() OVERRIDE; | 48 virtual void Cancel() override; |
| 49 | 49 |
| 50 // Implementation of URLRequest::Delegate methods. | 50 // Implementation of URLRequest::Delegate methods. |
| 51 virtual void OnResponseStarted(URLRequest* request) OVERRIDE; | 51 virtual void OnResponseStarted(URLRequest* request) override; |
| 52 virtual void OnReadCompleted(URLRequest* request, int bytes_read) OVERRIDE; | 52 virtual void OnReadCompleted(URLRequest* request, int bytes_read) override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 enum State { | 55 enum State { |
| 56 STATE_NONE, | 56 STATE_NONE, |
| 57 STATE_IDLE, | 57 STATE_IDLE, |
| 58 STATE_REQUEST_STARTED, | 58 STATE_REQUEST_STARTED, |
| 59 STATE_REQUEST_READING, | 59 STATE_REQUEST_READING, |
| 60 STATE_REQUEST_COMPLETE, | 60 STATE_REQUEST_COMPLETE, |
| 61 }; | 61 }; |
| 62 | 62 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 URLRequestContext* context_; | 103 URLRequestContext* context_; |
| 104 | 104 |
| 105 base::WeakPtrFactory<SdchDictionaryFetcher> weak_factory_; | 105 base::WeakPtrFactory<SdchDictionaryFetcher> weak_factory_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); | 107 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace net | 110 } // namespace net |
| 111 | 111 |
| 112 #endif // NET_BASE_SDCH_DICTIONARY_FETCHER_H_ | 112 #endif // NET_BASE_SDCH_DICTIONARY_FETCHER_H_ |
| OLD | NEW |