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

Side by Side Diff: extensions/browser/api/web_request/web_request_api_helpers.h

Issue 568583002: Introduce WebRequestEventRouterDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 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 // Helper classes and functions used for the WebRequest API. 5 // Helper classes and functions used for the WebRequest API.
6 6
7 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 7 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
8 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 8 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 23 matching lines...) Expand all
34 class Extension; 34 class Extension;
35 } 35 }
36 36
37 namespace net { 37 namespace net {
38 class BoundNetLog; 38 class BoundNetLog;
39 class URLRequest; 39 class URLRequest;
40 } 40 }
41 41
42 namespace extension_web_request_api_helpers { 42 namespace extension_web_request_api_helpers {
43 43
44
44 typedef std::pair<std::string, std::string> ResponseHeader; 45 typedef std::pair<std::string, std::string> ResponseHeader;
45 typedef std::vector<ResponseHeader> ResponseHeaders; 46 typedef std::vector<ResponseHeader> ResponseHeaders;
46 47
47 // Data container for RequestCookies as defined in the declarative WebRequest 48 // Data container for RequestCookies as defined in the declarative WebRequest
48 // API definition. 49 // API definition.
49 struct RequestCookie { 50 struct RequestCookie {
50 RequestCookie(); 51 RequestCookie();
51 ~RequestCookie(); 52 ~RequestCookie();
52 scoped_ptr<std::string> name; 53 scoped_ptr<std::string> name;
53 scoped_ptr<std::string> value; 54 scoped_ptr<std::string> value;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // collect UMA statistics on Page Load Times. Needs to be called on the UI 314 // collect UMA statistics on Page Load Times. Needs to be called on the UI
314 // thread. 315 // thread.
315 void NotifyWebRequestAPIUsed( 316 void NotifyWebRequestAPIUsed(
316 void* browser_context_id, 317 void* browser_context_id,
317 scoped_refptr<const extensions::Extension> extension); 318 scoped_refptr<const extensions::Extension> extension);
318 319
319 // Send updates to |host| with information about what webRequest-related 320 // Send updates to |host| with information about what webRequest-related
320 // extensions are installed. 321 // extensions are installed.
321 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); 322 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
322 323
324 // Converts the |name|, |value| pair of a http header to a HttpHeaders
325 // dictionary. Ownership is passed to the caller.
326 base::DictionaryValue* CreateHeaderDictionary(
327 const std::string& name, const std::string& value);
328
323 } // namespace extension_web_request_api_helpers 329 } // namespace extension_web_request_api_helpers
324 330
325 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 331 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/extensions_api_client.cc ('k') | extensions/browser/api/web_request/web_request_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698