OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ |
6 #define CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ | 6 #define CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 virtual void Unpack(const base::DictionaryValue& parsed_json) = 0; | 45 virtual void Unpack(const base::DictionaryValue& parsed_json) = 0; |
46 | 46 |
47 PrefService* prefs_; | 47 PrefService* prefs_; |
48 | 48 |
49 private: | 49 private: |
50 class UnpackerClient; | 50 class UnpackerClient; |
51 friend class base::RefCountedThreadSafe<WebResourceService>; | 51 friend class base::RefCountedThreadSafe<WebResourceService>; |
52 | 52 |
53 // content::URLFetcherDelegate implementation: | 53 // content::URLFetcherDelegate implementation: |
54 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; | 54 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
55 | 55 |
56 // Schedules a fetch after |delay_ms| milliseconds. | 56 // Schedules a fetch after |delay_ms| milliseconds. |
57 void ScheduleFetch(int64 delay_ms); | 57 void ScheduleFetch(int64 delay_ms); |
58 | 58 |
59 // Starts fetching data from the server. | 59 // Starts fetching data from the server. |
60 void StartFetch(); | 60 void StartFetch(); |
61 | 61 |
62 // Set |in_fetch_| to false, clean up temp directories (in the future). | 62 // Set |in_fetch_| to false, clean up temp directories (in the future). |
63 void EndFetch(); | 63 void EndFetch(); |
64 | 64 |
(...skipping 22 matching lines...) Expand all Loading... |
87 int start_fetch_delay_ms_; | 87 int start_fetch_delay_ms_; |
88 | 88 |
89 // Delay between calls to update the web resource cache. This delay may be | 89 // Delay between calls to update the web resource cache. This delay may be |
90 // different for different builds of Chrome. | 90 // different for different builds of Chrome. |
91 int cache_update_delay_ms_; | 91 int cache_update_delay_ms_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(WebResourceService); | 93 DISALLOW_COPY_AND_ASSIGN(WebResourceService); |
94 }; | 94 }; |
95 | 95 |
96 #endif // CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ | 96 #endif // CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ |
OLD | NEW |