Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h

Issue 981633002: Created new URLRequestContext for secure proxy check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed minor bug Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_
6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_
7 7
8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ est_options.h" 8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ est_options.h"
9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
10 #include "components/keyed_service/core/keyed_service.h" 10 #include "components/keyed_service/core/keyed_service.h"
11 11
12 class PrefService; 12 class PrefService;
13 13
14 namespace base { 14 namespace base {
15 class SingleThreadTaskRunner; 15 class SingleThreadTaskRunner;
16 } 16 }
17 17
18 namespace data_reduction_proxy { 18 namespace data_reduction_proxy {
19 class DataReductionProxyIOData; 19 class DataReductionProxyIOData;
20 } 20 }
21 21
22 namespace net {
23 class URLRequestContextGetter;
24 }
25
26 class PrefService; 22 class PrefService;
27 23
28 // Data reduction proxy settings class suitable for use with a Chrome browser. 24 // Data reduction proxy settings class suitable for use with a Chrome browser.
29 // It is keyed to a browser context. 25 // It is keyed to a browser context.
30 class DataReductionProxyChromeSettings 26 class DataReductionProxyChromeSettings
31 : public data_reduction_proxy::DataReductionProxySettings, 27 : public data_reduction_proxy::DataReductionProxySettings,
32 public KeyedService { 28 public KeyedService {
33 public: 29 public:
34 // Constructs a settings object. Construction and destruction must happen on 30 // Constructs a settings object. Construction and destruction must happen on
35 // the UI thread. 31 // the UI thread.
36 DataReductionProxyChromeSettings(); 32 DataReductionProxyChromeSettings();
37 33
38 // Destructs the settings object. 34 // Destructs the settings object.
39 ~DataReductionProxyChromeSettings() override; 35 ~DataReductionProxyChromeSettings() override;
40 36
41 // Overrides KeyedService::Shutdown: 37 // Overrides KeyedService::Shutdown:
42 void Shutdown() override; 38 void Shutdown() override;
43 39
44 // Initialize the settings object with the given io_data, prefs services, 40 // Initialize the settings object with the given io_data, prefs services,
45 // request context getter, and task runner. 41 // request context getter, and task runner.
46 void InitDataReductionProxySettings( 42 void InitDataReductionProxySettings(
47 data_reduction_proxy::DataReductionProxyIOData* io_data, 43 data_reduction_proxy::DataReductionProxyIOData* io_data,
48 PrefService* profile_prefs, 44 PrefService* profile_prefs,
49 net::URLRequestContextGetter* request_context_getter,
50 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner); 45 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner);
51 46
52 // Gets the client type for the data reduction proxy. 47 // Gets the client type for the data reduction proxy.
53 static data_reduction_proxy::Client GetClient(); 48 static data_reduction_proxy::Client GetClient();
54 49
55 // Public for testing. 50 // Public for testing.
56 void MigrateDataReductionProxyOffProxyPrefs(PrefService* prefs); 51 void MigrateDataReductionProxyOffProxyPrefs(PrefService* prefs);
57 52
58 private: 53 private:
59 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); 54 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings);
60 }; 55 };
61 56
62 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ 57 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698