Chromium Code Reviews| 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 // Support modularity by calling to load a new SDCH filter dictionary. | 5 // Support modularity by calling to load a new SDCH filter dictionary. |
| 6 // Note that this sort of calling can't be done in the /net directory, as it has | 6 // Note that this sort of calling can't be done in the /net directory, as it has |
| 7 // no concept of the HTTP cache (which is only visible at the browser level). | 7 // no concept of the HTTP cache (which is only visible at the browser level). |
| 8 | 8 |
| 9 #ifndef NET_BASE_SDCH_DICTIONARY_FETCHER_H_ | 9 #ifndef NET_BASE_SDCH_DICTIONARY_FETCHER_H_ |
| 10 #define NET_BASE_SDCH_DICTIONARY_FETCHER_H_ | 10 #define NET_BASE_SDCH_DICTIONARY_FETCHER_H_ |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 namespace net { | 22 namespace net { |
| 23 | 23 |
| 24 class URLFetcher; | 24 class URLFetcher; |
| 25 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
| 26 | 26 |
| 27 class NET_EXPORT SdchDictionaryFetcher | 27 class NET_EXPORT SdchDictionaryFetcher |
| 28 : public URLFetcherDelegate, | 28 : public URLFetcherDelegate, |
| 29 public SdchFetcher, | 29 public SdchFetcher, |
| 30 public base::NonThreadSafe { | 30 public base::NonThreadSafe { |
| 31 public: | 31 public: |
| 32 // Consumer must guarantee that the SdchManager pointer outlives | 32 // The consumer must guarantee that |*manager| outlives |
| 33 // this object. The current implementation guarantees this by | 33 // this object. The current implementation guarantees this by |
| 34 // the SdchManager owning this object. | 34 // the SdchManager owning this object. |
| 35 // SdchDictionaryFetcher takes a reference to |*context|. | |
|
jar (doing other things)
2014/08/13 01:28:59
nit: I had to read this several times, and look at
Randy Smith (Not in Mondays)
2014/08/13 02:05:26
So I'll say that if you ask me again, but it becau
jar (doing other things)
2014/08/14 22:33:25
Ah... ok... with that context, I see how I misread
Randy Smith (Not in Mondays)
2014/08/18 19:11:06
There was some reason that was a hassle when I fir
| |
| 35 SdchDictionaryFetcher(SdchManager* manager, | 36 SdchDictionaryFetcher(SdchManager* manager, |
| 36 URLRequestContextGetter* context); | 37 URLRequestContextGetter* context); |
| 37 virtual ~SdchDictionaryFetcher(); | 38 virtual ~SdchDictionaryFetcher(); |
| 38 | 39 |
| 39 // Implementation of SdchFetcher class. | 40 // Implementation of SdchFetcher class. |
| 40 virtual void Schedule(const GURL& dictionary_url) OVERRIDE; | 41 virtual void Schedule(const GURL& dictionary_url) OVERRIDE; |
| 41 virtual void Cancel() OVERRIDE; | 42 virtual void Cancel() OVERRIDE; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 // Delay in ms between Schedule and actual download. | 45 // Delay in ms between Schedule and actual download. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // Store the system_url_request_context_getter to use it when we start | 91 // Store the system_url_request_context_getter to use it when we start |
| 91 // fetching. | 92 // fetching. |
| 92 scoped_refptr<URLRequestContextGetter> context_; | 93 scoped_refptr<URLRequestContextGetter> context_; |
| 93 | 94 |
| 94 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); | 95 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace net | 98 } // namespace net |
| 98 | 99 |
| 99 #endif // NET_BASE_SDCH_DICTIONARY_FETCHER_H_ | 100 #endif // NET_BASE_SDCH_DICTIONARY_FETCHER_H_ |
| OLD | NEW |