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

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

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const 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 // Helper classes and functions used for the WebRequest API. 5 // Helper classes and functions used for the WebRequest API.
6 6
7 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 7 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
8 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 8 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bool InDecreasingExtensionInstallationTimeOrder( 84 bool InDecreasingExtensionInstallationTimeOrder(
85 const linked_ptr<EventResponseDelta>& a, 85 const linked_ptr<EventResponseDelta>& a,
86 const linked_ptr<EventResponseDelta>& b); 86 const linked_ptr<EventResponseDelta>& b);
87 87
88 // Converts a string to a list of integers, each in 0..255. Ownership 88 // Converts a string to a list of integers, each in 0..255. Ownership
89 // of the created list is passed to the caller. 89 // of the created list is passed to the caller.
90 base::ListValue* StringToCharList(const std::string& s); 90 base::ListValue* StringToCharList(const std::string& s);
91 91
92 // Converts a list of integer values between 0 and 255 into a string |*out|. 92 // Converts a list of integer values between 0 and 255 into a string |*out|.
93 // Returns true if the conversion was successful. 93 // Returns true if the conversion was successful.
94 bool CharListToString(base::ListValue* list, std::string* out); 94 bool CharListToString(const base::ListValue* list, std::string* out);
95 95
96 // The following functions calculate and return the modifications to requests 96 // The following functions calculate and return the modifications to requests
97 // commanded by extension handlers. All functions take the id of the extension 97 // commanded by extension handlers. All functions take the id of the extension
98 // that commanded a modification, the installation time of this extension (used 98 // that commanded a modification, the installation time of this extension (used
99 // for defining a precedence in conflicting modifications) and whether the 99 // for defining a precedence in conflicting modifications) and whether the
100 // extension requested to |cancel| the request. Other parameters depend on a 100 // extension requested to |cancel| the request. Other parameters depend on a
101 // the signal handler. Ownership of the returned object is passed to the caller. 101 // the signal handler. Ownership of the returned object is passed to the caller.
102 102
103 EventResponseDelta* CalculateOnBeforeRequestDelta( 103 EventResponseDelta* CalculateOnBeforeRequestDelta(
104 const std::string& extension_id, 104 const std::string& extension_id,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 // Returns whether |extension| may access |url| based on host permissions. 192 // Returns whether |extension| may access |url| based on host permissions.
193 // In addition to that access is granted to about: URLs and extension URLs 193 // In addition to that access is granted to about: URLs and extension URLs
194 // that are in the scope of |extension|. 194 // that are in the scope of |extension|.
195 bool CanExtensionAccessURL(const extensions::Extension* extension, 195 bool CanExtensionAccessURL(const extensions::Extension* extension,
196 const GURL& url); 196 const GURL& url);
197 197
198 } // namespace extension_web_request_api_helpers 198 } // namespace extension_web_request_api_helpers
199 199
200 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 200 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698