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

Side by Side Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_rule.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_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 typedef std::string ExtensionId; 43 typedef std::string ExtensionId;
44 typedef std::string RuleId; 44 typedef std::string RuleId;
45 typedef std::pair<ExtensionId, RuleId> GlobalRuleId; 45 typedef std::pair<ExtensionId, RuleId> GlobalRuleId;
46 typedef int Priority; 46 typedef int Priority;
47 47
48 struct RequestData { 48 struct RequestData {
49 RequestData(net::URLRequest* request, RequestStage stage) 49 RequestData(net::URLRequest* request, RequestStage stage)
50 : request(request), stage(stage), 50 : request(request), stage(stage),
51 original_response_headers(NULL) {} 51 original_response_headers(NULL) {}
52 RequestData(net::URLRequest* request, RequestStage stage, 52 RequestData(net::URLRequest* request, RequestStage stage,
53 net::HttpResponseHeaders* original_response_headers) 53 const net::HttpResponseHeaders* original_response_headers)
54 : request(request), stage(stage), 54 : request(request), stage(stage),
55 original_response_headers(original_response_headers) {} 55 original_response_headers(original_response_headers) {}
56 net::URLRequest* request; 56 net::URLRequest* request;
57 RequestStage stage; 57 RequestStage stage;
58 // Additional information about requests that is not 58 // Additional information about requests that is not
59 // available in all request stages. 59 // available in all request stages.
60 net::HttpResponseHeaders* original_response_headers; 60 const net::HttpResponseHeaders* original_response_headers;
61 }; 61 };
62 62
63 WebRequestRule(const GlobalRuleId& id, 63 WebRequestRule(const GlobalRuleId& id,
64 base::Time extension_installation_time, 64 base::Time extension_installation_time,
65 scoped_ptr<WebRequestConditionSet> conditions, 65 scoped_ptr<WebRequestConditionSet> conditions,
66 scoped_ptr<WebRequestActionSet> actions, 66 scoped_ptr<WebRequestActionSet> actions,
67 Priority priority); 67 Priority priority);
68 virtual ~WebRequestRule(); 68 virtual ~WebRequestRule();
69 69
70 // If |error| is empty, the translation was successful and the returned 70 // If |error| is empty, the translation was successful and the returned
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 scoped_ptr<WebRequestConditionSet> conditions_; 113 scoped_ptr<WebRequestConditionSet> conditions_;
114 scoped_ptr<WebRequestActionSet> actions_; 114 scoped_ptr<WebRequestActionSet> actions_;
115 Priority priority_; 115 Priority priority_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(WebRequestRule); 117 DISALLOW_COPY_AND_ASSIGN(WebRequestRule);
118 }; 118 };
119 119
120 } // namespace extensions 120 } // namespace extensions
121 121
122 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_ H_ 122 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698