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

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

Issue 10694055: Add read-only access to POST data for webRequest's onBeforeRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Now checking the channel for real Created 8 years, 4 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_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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Internal representation of the extraInfoSpec parameter on webRequest 93 // Internal representation of the extraInfoSpec parameter on webRequest
94 // events, used to specify extra information to be included with network 94 // events, used to specify extra information to be included with network
95 // events. 95 // events.
96 struct ExtraInfoSpec { 96 struct ExtraInfoSpec {
97 enum Flags { 97 enum Flags {
98 REQUEST_HEADERS = 1<<0, 98 REQUEST_HEADERS = 1<<0,
99 RESPONSE_HEADERS = 1<<1, 99 RESPONSE_HEADERS = 1<<1,
100 BLOCKING = 1<<2, 100 BLOCKING = 1<<2,
101 ASYNC_BLOCKING = 1<<3, 101 ASYNC_BLOCKING = 1<<3,
102 POST_DATA = 1<<4,
102 }; 103 };
103 104
104 static bool InitFromValue(const base::ListValue& value, 105 static bool InitFromValue(const base::ListValue& value,
105 int* extra_info_spec); 106 int* extra_info_spec);
106 }; 107 };
107 108
108 // Contains an extension's response to a blocking event. 109 // Contains an extension's response to a blocking event.
109 struct EventResponse { 110 struct EventResponse {
110 EventResponse(const std::string& extension_id, 111 EventResponse(const std::string& extension_id,
111 const base::Time& extension_install_time); 112 const base::Time& extension_install_time);
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // Handle quota exceeded gracefully: Only warn the user but still execute the 436 // Handle quota exceeded gracefully: Only warn the user but still execute the
436 // function. 437 // function.
437 virtual void OnQuotaExceeded() OVERRIDE; 438 virtual void OnQuotaExceeded() OVERRIDE;
438 virtual bool RunImpl() OVERRIDE; 439 virtual bool RunImpl() OVERRIDE;
439 }; 440 };
440 441
441 // Send updates to |host| with information about what webRequest-related 442 // Send updates to |host| with information about what webRequest-related
442 // extensions are installed. 443 // extensions are installed.
443 // TODO(mpcomplete): remove. http://crbug.com/100411 444 // TODO(mpcomplete): remove. http://crbug.com/100411
444 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); 445 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
445 446
wtc 2012/08/01 17:24:41 The URL "crbug.com/10694055" is wrong. 10694055 i
vabr (Chromium) 2012/08/02 09:15:15 Changed the number to the bug number. Thanks!
447 // PostData feature (crbug.com/10694055/) is currently only available in dev
448 // and canary channels. This function caches the channel info from
wtc 2012/08/01 17:24:41 Nit: channel => release channel Should we documen
vabr (Chromium) 2012/08/02 09:15:15 Added "release". As for documenting that it retur
449 // chrome::VersionInfo. It is used both in WebRequest implementation and in
450 // tests, so it needs to be in this header.
451 bool IsPostDataEnabled();
Matt Perry 2012/08/01 09:46:31 Use a more descriptive name for a global function
vabr (Chromium) 2012/08/01 18:03:22 Done.
452
446 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 453 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698