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

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

Issue 10451071: Add support for response header manipulation in Declarative WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 6 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 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Processes the generated deltas from blocked_requests_ on the specified 323 // Processes the generated deltas from blocked_requests_ on the specified
324 // request. If |call_back| is true, the callback registered in 324 // request. If |call_back| is true, the callback registered in
325 // |blocked_requests_| is called. 325 // |blocked_requests_| is called.
326 // The function returns the error code for the network request. This is 326 // The function returns the error code for the network request. This is
327 // mostly relevant in case the caller passes |call_callback| = false 327 // mostly relevant in case the caller passes |call_callback| = false
328 // and wants to return the correct network error code himself. 328 // and wants to return the correct network error code himself.
329 int ExecuteDeltas(void* profile, uint64 request_id, bool call_callback); 329 int ExecuteDeltas(void* profile, uint64 request_id, bool call_callback);
330 330
331 // Evaluates the rules of the declarative webrequest API and stores 331 // Evaluates the rules of the declarative webrequest API and stores
332 // modifications to the request that result from WebRequestActions as 332 // modifications to the request that result from WebRequestActions as
333 // deltas in |blocked_requests_|. Returns whether any deltas were 333 // deltas in |blocked_requests_|. |original_response_headers| should only be
334 // generated. 334 // set for the OnHeadersReceived stage and NULL otherwise. Returns whether any
335 bool ProcessDeclarativeRules(net::URLRequest* request, 335 // deltas were generated.
336 extensions::RequestStages request_stage); 336 bool ProcessDeclarativeRules(
337 net::URLRequest* request,
338 extensions::RequestStages request_stage,
339 net::HttpResponseHeaders* original_response_headers);
337 340
338 // Sets the flag that |event_type| has been signaled for |request_id|. 341 // Sets the flag that |event_type| has been signaled for |request_id|.
339 // Returns the value of the flag before setting it. 342 // Returns the value of the flag before setting it.
340 bool GetAndSetSignaled(uint64 request_id, EventTypes event_type); 343 bool GetAndSetSignaled(uint64 request_id, EventTypes event_type);
341 344
342 // Clears the flag that |event_type| has been signaled for |request_id|. 345 // Clears the flag that |event_type| has been signaled for |request_id|.
343 void ClearSignaled(uint64 request_id, EventTypes event_type); 346 void ClearSignaled(uint64 request_id, EventTypes event_type);
344 347
345 // Returns whether |request| represents a top level window navigation. 348 // Returns whether |request| represents a top level window navigation.
346 bool IsPageLoad(net::URLRequest* request) const; 349 bool IsPageLoad(net::URLRequest* request) const;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 virtual void OnQuotaExceeded() OVERRIDE; 415 virtual void OnQuotaExceeded() OVERRIDE;
413 virtual bool RunImpl() OVERRIDE; 416 virtual bool RunImpl() OVERRIDE;
414 }; 417 };
415 418
416 // Send updates to |host| with information about what webRequest-related 419 // Send updates to |host| with information about what webRequest-related
417 // extensions are installed. 420 // extensions are installed.
418 // TODO(mpcomplete): remove. http://crbug.com/100411 421 // TODO(mpcomplete): remove. http://crbug.com/100411
419 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); 422 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
420 423
421 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 424 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698