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

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

Issue 425653002: content: ResourceType cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 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 | 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 struct RequestFilter { 112 struct RequestFilter {
113 RequestFilter(); 113 RequestFilter();
114 ~RequestFilter(); 114 ~RequestFilter();
115 115
116 // Returns false if there was an error initializing. If it is a user error, 116 // Returns false if there was an error initializing. If it is a user error,
117 // an error message is provided, otherwise the error is internal (and 117 // an error message is provided, otherwise the error is internal (and
118 // unexpected). 118 // unexpected).
119 bool InitFromValue(const base::DictionaryValue& value, std::string* error); 119 bool InitFromValue(const base::DictionaryValue& value, std::string* error);
120 120
121 extensions::URLPatternSet urls; 121 extensions::URLPatternSet urls;
122 std::vector<content::ResourceType::Type> types; 122 std::vector<content::ResourceType> types;
123 int tab_id; 123 int tab_id;
124 int window_id; 124 int window_id;
125 }; 125 };
126 126
127 // Internal representation of the extraInfoSpec parameter on webRequest 127 // Internal representation of the extraInfoSpec parameter on webRequest
128 // events, used to specify extra information to be included with network 128 // events, used to specify extra information to be included with network
129 // events. 129 // events.
130 struct ExtraInfoSpec { 130 struct ExtraInfoSpec {
131 enum Flags { 131 enum Flags {
132 REQUEST_HEADERS = 1<<0, 132 REQUEST_HEADERS = 1<<0,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 void GetMatchingListenersImpl( 350 void GetMatchingListenersImpl(
351 void* profile, 351 void* profile,
352 extensions::InfoMap* extension_info_map, 352 extensions::InfoMap* extension_info_map,
353 bool crosses_incognito, 353 bool crosses_incognito,
354 const std::string& event_name, 354 const std::string& event_name,
355 const GURL& url, 355 const GURL& url,
356 int tab_id, 356 int tab_id,
357 int window_id, 357 int window_id,
358 int render_process_host_id, 358 int render_process_host_id,
359 int routing_id, 359 int routing_id,
360 content::ResourceType::Type resource_type, 360 content::ResourceType resource_type,
361 bool is_async_request, 361 bool is_async_request,
362 bool is_request_from_extension, 362 bool is_request_from_extension,
363 int* extra_info_spec, 363 int* extra_info_spec,
364 std::vector<const ExtensionWebRequestEventRouter::EventListener*>* 364 std::vector<const ExtensionWebRequestEventRouter::EventListener*>*
365 matching_listeners); 365 matching_listeners);
366 366
367 // Decrements the count of event handlers blocking the given request. When the 367 // Decrements the count of event handlers blocking the given request. When the
368 // count reaches 0, we stop blocking the request and proceed it using the 368 // count reaches 0, we stop blocking the request and proceed it using the
369 // method requested by the extension with the highest precedence. Precedence 369 // method requested by the extension with the highest precedence. Precedence
370 // is decided by extension install time. If |response| is non-NULL, this 370 // is decided by extension install time. If |response| is non-NULL, this
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // function. 520 // function.
521 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; 521 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE;
522 virtual bool RunSync() OVERRIDE; 522 virtual bool RunSync() OVERRIDE;
523 }; 523 };
524 524
525 // Send updates to |host| with information about what webRequest-related 525 // Send updates to |host| with information about what webRequest-related
526 // extensions are installed. 526 // extensions are installed.
527 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); 527 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
528 528
529 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 529 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698