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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api.h

Issue 10944013: Make original_response_headers parameter of NetworkDelegate::OnHeadersReceived const (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 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 | Annotate | Revision Log
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_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // and |override_response_headers| are owned by a URLRequestJob. They are 174 // and |override_response_headers| are owned by a URLRequestJob. They are
175 // guaranteed to be valid until |callback| is called or OnURLRequestDestroyed 175 // guaranteed to be valid until |callback| is called or OnURLRequestDestroyed
176 // is called (whatever comes first). 176 // is called (whatever comes first).
177 // Do not modify |original_response_headers| directly but write new ones 177 // Do not modify |original_response_headers| directly but write new ones
178 // into |override_response_headers|. 178 // into |override_response_headers|.
179 int OnHeadersReceived( 179 int OnHeadersReceived(
180 void* profile, 180 void* profile,
181 ExtensionInfoMap* extension_info_map, 181 ExtensionInfoMap* extension_info_map,
182 net::URLRequest* request, 182 net::URLRequest* request,
183 const net::CompletionCallback& callback, 183 const net::CompletionCallback& callback,
184 net::HttpResponseHeaders* original_response_headers, 184 const net::HttpResponseHeaders* original_response_headers,
185 scoped_refptr<net::HttpResponseHeaders>* override_response_headers); 185 scoped_refptr<net::HttpResponseHeaders>* override_response_headers);
186 186
187 // Dispatches the OnAuthRequired event to any extensions whose filters match 187 // Dispatches the OnAuthRequired event to any extensions whose filters match
188 // the given request. If the listener is not registered as "blocking", then 188 // the given request. If the listener is not registered as "blocking", then
189 // AUTH_REQUIRED_RESPONSE_OK is returned. Otherwise, 189 // AUTH_REQUIRED_RESPONSE_OK is returned. Otherwise,
190 // AUTH_REQUIRED_RESPONSE_IO_PENDING is returned and |callback| will be 190 // AUTH_REQUIRED_RESPONSE_IO_PENDING is returned and |callback| will be
191 // invoked later. 191 // invoked later.
192 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( 192 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired(
193 void* profile, 193 void* profile,
194 ExtensionInfoMap* extension_info_map, 194 ExtensionInfoMap* extension_info_map,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // modifications to the request that result from WebRequestActions as 339 // modifications to the request that result from WebRequestActions as
340 // deltas in |blocked_requests_|. |original_response_headers| should only be 340 // deltas in |blocked_requests_|. |original_response_headers| should only be
341 // set for the OnHeadersReceived stage and NULL otherwise. Returns whether any 341 // set for the OnHeadersReceived stage and NULL otherwise. Returns whether any
342 // deltas were generated. 342 // deltas were generated.
343 bool ProcessDeclarativeRules( 343 bool ProcessDeclarativeRules(
344 void* profile, 344 void* profile,
345 ExtensionInfoMap* extension_info_map, 345 ExtensionInfoMap* extension_info_map,
346 const std::string& event_name, 346 const std::string& event_name,
347 net::URLRequest* request, 347 net::URLRequest* request,
348 extensions::RequestStage request_stage, 348 extensions::RequestStage request_stage,
349 net::HttpResponseHeaders* original_response_headers); 349 const net::HttpResponseHeaders* original_response_headers);
350 350
351 // Called when the RulesRegistry is ready to unblock a request that was 351 // Called when the RulesRegistry is ready to unblock a request that was
352 // waiting for said event. 352 // waiting for said event.
353 void OnRulesRegistryReady( 353 void OnRulesRegistryReady(
354 void* profile, 354 void* profile,
355 const std::string& event_name, 355 const std::string& event_name,
356 uint64 request_id, 356 uint64 request_id,
357 extensions::RequestStage request_stage); 357 extensions::RequestStage request_stage);
358 358
359 // Sets the flag that |event_type| has been signaled for |request_id|. 359 // Sets the flag that |event_type| has been signaled for |request_id|.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; 442 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE;
443 virtual bool RunImpl() OVERRIDE; 443 virtual bool RunImpl() OVERRIDE;
444 }; 444 };
445 445
446 // Send updates to |host| with information about what webRequest-related 446 // Send updates to |host| with information about what webRequest-related
447 // extensions are installed. 447 // extensions are installed.
448 // TODO(mpcomplete): remove. http://crbug.com/100411 448 // TODO(mpcomplete): remove. http://crbug.com/100411
449 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); 449 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
450 450
451 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 451 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698