OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ | 9 #ifndef CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ |
10 #define CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ | 10 #define CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ |
11 | 11 |
12 #include <queue> | 12 #include <queue> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/task.h" | 16 #include "base/task.h" |
17 #include "chrome/browser/url_fetcher.h" | 17 #include "chrome/browser/net/url_fetcher.h" |
18 #include "net/base/sdch_manager.h" | 18 #include "net/base/sdch_manager.h" |
19 | 19 |
20 class SdchDictionaryFetcher : public URLFetcher::Delegate, | 20 class SdchDictionaryFetcher : public URLFetcher::Delegate, |
21 public SdchFetcher { | 21 public SdchFetcher { |
22 public: | 22 public: |
23 SdchDictionaryFetcher() : | 23 SdchDictionaryFetcher() : |
24 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), | 24 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
25 task_is_pending_(false) {} | 25 task_is_pending_(false) {} |
26 virtual ~SdchDictionaryFetcher() {} | 26 virtual ~SdchDictionaryFetcher() {} |
27 | 27 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Always spread out the dictionary fetches, so that they don't steal | 59 // Always spread out the dictionary fetches, so that they don't steal |
60 // bandwidth from the actual page load. Create delayed tasks to spread out | 60 // bandwidth from the actual page load. Create delayed tasks to spread out |
61 // the download. | 61 // the download. |
62 ScopedRunnableMethodFactory<SdchDictionaryFetcher> method_factory_; | 62 ScopedRunnableMethodFactory<SdchDictionaryFetcher> method_factory_; |
63 bool task_is_pending_; | 63 bool task_is_pending_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); | 65 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); |
66 }; | 66 }; |
67 | 67 |
68 #endif // CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ | 68 #endif // CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ |
OLD | NEW |