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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.h

Issue 24451003: Client Hints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit and use ScopedLocale with posix only Created 7 years, 2 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 (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_NET_CHROME_NETWORK_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "net/base/network_delegate.h" 15 #include "net/base/network_delegate.h"
15 16
17 class ClientHints;
16 class CookieSettings; 18 class CookieSettings;
17 class ExtensionInfoMap; 19 class ExtensionInfoMap;
18 class PrefService; 20 class PrefService;
19 template<class T> class PrefMember; 21 template<class T> class PrefMember;
20 22
21 typedef PrefMember<bool> BooleanPrefMember; 23 typedef PrefMember<bool> BooleanPrefMember;
22 24
23 namespace base { 25 namespace base {
24 class Value; 26 class Value;
25 } 27 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 85
84 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) { 86 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) {
85 enable_do_not_track_ = enable_do_not_track; 87 enable_do_not_track_ = enable_do_not_track;
86 } 88 }
87 89
88 void set_force_google_safe_search( 90 void set_force_google_safe_search(
89 BooleanPrefMember* force_google_safe_search) { 91 BooleanPrefMember* force_google_safe_search) {
90 force_google_safe_search_ = force_google_safe_search; 92 force_google_safe_search_ = force_google_safe_search;
91 } 93 }
92 94
95 // Adds the Client Hints header to HTTP requests.
96 void SetEnableClientHints();
97
93 // Causes |OnCanThrottleRequest| to always return false, for all 98 // Causes |OnCanThrottleRequest| to always return false, for all
94 // instances of this object. 99 // instances of this object.
95 static void NeverThrottleRequests(); 100 static void NeverThrottleRequests();
96 101
97 // Binds the pref members to |pref_service| and moves them to the IO thread. 102 // Binds the pref members to |pref_service| and moves them to the IO thread.
98 // |enable_referrers| cannot be NULL, the others can. 103 // |enable_referrers| cannot be NULL, the others can.
99 // This method should be called on the UI thread. 104 // This method should be called on the UI thread.
100 static void InitializePrefsOnUIThread( 105 static void InitializePrefsOnUIThread(
101 BooleanPrefMember* enable_referrers, 106 BooleanPrefMember* enable_referrers,
102 BooleanPrefMember* enable_do_not_track, 107 BooleanPrefMember* enable_do_not_track,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Pointer to IOThread global, should outlive ChromeNetworkDelegate. 205 // Pointer to IOThread global, should outlive ChromeNetworkDelegate.
201 chrome_browser_net::LoadTimeStats* load_time_stats_; 206 chrome_browser_net::LoadTimeStats* load_time_stats_;
202 207
203 // Total size of all content (excluding headers) that has been received 208 // Total size of all content (excluding headers) that has been received
204 // over the network. 209 // over the network.
205 int64 received_content_length_; 210 int64 received_content_length_;
206 211
207 // Total original size of all content before it was transferred. 212 // Total original size of all content before it was transferred.
208 int64 original_content_length_; 213 int64 original_content_length_;
209 214
215 scoped_ptr<ClientHints> client_hints_;
216
210 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 217 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
211 }; 218 };
212 219
213 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 220 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698