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

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

Issue 1421983002: Include tab IDs when reporting data use accounting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_use_scoped_vector
Patch Set: Fixed external_data_use_observer test Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const net::HttpRequestHeaders& headers) override; 153 const net::HttpRequestHeaders& headers) override;
154 int OnHeadersReceived( 154 int OnHeadersReceived(
155 net::URLRequest* request, 155 net::URLRequest* request,
156 const net::CompletionCallback& callback, 156 const net::CompletionCallback& callback,
157 const net::HttpResponseHeaders* original_response_headers, 157 const net::HttpResponseHeaders* original_response_headers,
158 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, 158 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
159 GURL* allowed_unsafe_redirect_url) override; 159 GURL* allowed_unsafe_redirect_url) override;
160 void OnBeforeRedirect(net::URLRequest* request, 160 void OnBeforeRedirect(net::URLRequest* request,
161 const GURL& new_location) override; 161 const GURL& new_location) override;
162 void OnResponseStarted(net::URLRequest* request) override; 162 void OnResponseStarted(net::URLRequest* request) override;
163 void OnNetworkBytesReceived(const net::URLRequest& request, 163 void OnNetworkBytesReceived(net::URLRequest* request,
164 int64_t bytes_received) override; 164 int64_t bytes_received) override;
165 void OnNetworkBytesSent(const net::URLRequest& request, 165 void OnNetworkBytesSent(net::URLRequest* request,
166 int64_t bytes_sent) override; 166 int64_t bytes_sent) override;
167 void OnCompleted(net::URLRequest* request, bool started) override; 167 void OnCompleted(net::URLRequest* request, bool started) override;
168 void OnURLRequestDestroyed(net::URLRequest* request) override; 168 void OnURLRequestDestroyed(net::URLRequest* request) override;
169 void OnURLRequestJobOrphaned(net::URLRequest* request) override; 169 void OnURLRequestJobOrphaned(net::URLRequest* request) override;
170 void OnPACScriptError(int line_number, const base::string16& error) override; 170 void OnPACScriptError(int line_number, const base::string16& error) override;
171 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( 171 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired(
172 net::URLRequest* request, 172 net::URLRequest* request,
173 const net::AuthChallengeInfo& auth_info, 173 const net::AuthChallengeInfo& auth_info,
174 const AuthCallback& callback, 174 const AuthCallback& callback,
175 net::AuthCredentials* credentials) override; 175 net::AuthCredentials* credentials) override;
176 bool OnCanGetCookies(const net::URLRequest& request, 176 bool OnCanGetCookies(const net::URLRequest& request,
177 const net::CookieList& cookie_list) override; 177 const net::CookieList& cookie_list) override;
178 bool OnCanSetCookie(const net::URLRequest& request, 178 bool OnCanSetCookie(const net::URLRequest& request,
179 const std::string& cookie_line, 179 const std::string& cookie_line,
180 net::CookieOptions* options) override; 180 net::CookieOptions* options) override;
181 bool OnCanAccessFile(const net::URLRequest& request, 181 bool OnCanAccessFile(const net::URLRequest& request,
182 const base::FilePath& path) const override; 182 const base::FilePath& path) const override;
183 bool OnCanEnablePrivacyMode( 183 bool OnCanEnablePrivacyMode(
184 const GURL& url, 184 const GURL& url,
185 const GURL& first_party_for_cookies) const override; 185 const GURL& first_party_for_cookies) const override;
186 bool OnAreExperimentalCookieFeaturesEnabled() const override; 186 bool OnAreExperimentalCookieFeaturesEnabled() const override;
187 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( 187 bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
188 const net::URLRequest& request, 188 const net::URLRequest& request,
189 const GURL& target_url, 189 const GURL& target_url,
190 const GURL& referrer_url) const override; 190 const GURL& referrer_url) const override;
191 191
192 // Convenience function for reporting network usage to the
193 // |data_use_aggregator_|.
194 void ReportDataUsageStats(net::URLRequest* request,
195 int64_t tx_bytes,
196 int64_t rx_bytes);
197
192 scoped_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_; 198 scoped_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_;
193 199
194 void* profile_; 200 void* profile_;
195 base::FilePath profile_path_; 201 base::FilePath profile_path_;
196 scoped_refptr<content_settings::CookieSettings> cookie_settings_; 202 scoped_refptr<content_settings::CookieSettings> cookie_settings_;
197 203
198 scoped_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_; 204 scoped_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_;
199 205
200 // Weak, owned by our owner. 206 // Weak, owned by our owner.
201 BooleanPrefMember* enable_referrers_; 207 BooleanPrefMember* enable_referrers_;
(...skipping 19 matching lines...) Expand all
221 227
222 // Aggregates and reports network usage. 228 // Aggregates and reports network usage.
223 data_usage::DataUseAggregator* data_use_aggregator_; 229 data_usage::DataUseAggregator* data_use_aggregator_;
224 // Controls whether network usage is reported as being off the record. 230 // Controls whether network usage is reported as being off the record.
225 bool is_data_usage_off_the_record_; 231 bool is_data_usage_off_the_record_;
226 232
227 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 233 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
228 }; 234 };
229 235
230 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 236 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698