| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 #include "chrome/browser/utility_process_host.h" | 11 #include "content/browser/utility_process_host.h" |
| 12 #include "content/common/notification_type.h" | 12 #include "content/common/notification_type.h" |
| 13 | 13 |
| 14 class DictionaryValue; |
| 14 class PrefService; | 15 class PrefService; |
| 15 class Profile; | 16 class Profile; |
| 16 class ResourceDispatcherHost; | 17 class ResourceDispatcherHost; |
| 17 | 18 |
| 18 // A WebResourceService fetches data from a web resource server and store | 19 // A WebResourceService fetches data from a web resource server and store |
| 19 // locally as user preference. | 20 // locally as user preference. |
| 20 class WebResourceService | 21 class WebResourceService : public UtilityProcessHost::Client { |
| 21 : public UtilityProcessHost::Client { | |
| 22 public: | 22 public: |
| 23 // Pass notification_type = NOTIFICATION_TYPE_COUNT if notification is not | 23 // Pass notification_type = NOTIFICATION_TYPE_COUNT if notification is not |
| 24 // required. | 24 // required. |
| 25 WebResourceService(Profile* profile, | 25 WebResourceService(Profile* profile, |
| 26 PrefService* prefs, | 26 PrefService* prefs, |
| 27 const char* web_resource_server, | 27 const char* web_resource_server, |
| 28 bool apply_locale_to_url_, | 28 bool apply_locale_to_url_, |
| 29 NotificationType::Type notification_type, | 29 NotificationType::Type notification_type, |
| 30 const char* last_update_time_pref_name, | 30 const char* last_update_time_pref_name, |
| 31 int start_fetch_delay, | 31 int start_fetch_delay, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 int cache_update_delay_; | 104 int cache_update_delay_; |
| 105 | 105 |
| 106 // True if a task has been set to update the cache when a new web resource | 106 // True if a task has been set to update the cache when a new web resource |
| 107 // becomes available. | 107 // becomes available. |
| 108 bool web_resource_update_scheduled_; | 108 bool web_resource_update_scheduled_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(WebResourceService); | 110 DISALLOW_COPY_AND_ASSIGN(WebResourceService); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 #endif // CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ | 113 #endif // CHROME_BROWSER_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_ |
| OLD | NEW |