OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_WEB_RESOURCE_CHROME_WEB_RESOURCE_SERVICE_H_ | |
6 #define CHROME_BROWSER_WEB_RESOURCE_CHROME_WEB_RESOURCE_SERVICE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "components/web_resource/web_resource_service.h" | |
10 | |
11 // Chrome implementation of WebResourceService. | |
12 // ChromeWebResourceService safely parses JSON out of process. | |
13 class ChromeWebResourceService : public web_resource::WebResourceService { | |
14 public: | |
15 ChromeWebResourceService(PrefService* prefs, | |
16 const GURL& web_resource_server, | |
17 bool apply_locale_to_url, | |
18 const char* last_update_time_pref_name, | |
19 int start_fetch_delay_ms, | |
20 int cache_update_delay_ms); | |
21 | |
22 protected: | |
23 ~ChromeWebResourceService() override; | |
24 | |
25 private: | |
26 // WebResourceService implementation: | |
27 void ParseJSON(const std::string& data, | |
28 const SuccessCallback& success_callback, | |
29 const ErrorCallback& error_callback) override; | |
30 | |
31 DISALLOW_COPY_AND_ASSIGN(ChromeWebResourceService); | |
32 }; | |
33 | |
34 #endif // CHROME_BROWSER_WEB_RESOURCE_CHROME_WEB_RESOURCE_SERVICE_H_ | |
OLD | NEW |