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

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

Issue 491123004: Make sure that HttpRequestHeaders contains valid key-value pairs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edit comment Created 6 years, 3 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Triggers clearing each renderer's in-memory cache the next time it navigates. 319 // Triggers clearing each renderer's in-memory cache the next time it navigates.
320 void ClearCacheOnNavigation(); 320 void ClearCacheOnNavigation();
321 321
322 // Tells renderer processes that the web request or declarative web request 322 // Tells renderer processes that the web request or declarative web request
323 // API has been used by |extension| in profile |profile_id| to collect 323 // API has been used by |extension| in profile |profile_id| to collect
324 // UMA statistics on Page Load Times. Needs to be called on the UI thread. 324 // UMA statistics on Page Load Times. Needs to be called on the UI thread.
325 void NotifyWebRequestAPIUsed( 325 void NotifyWebRequestAPIUsed(
326 void* profile_id, 326 void* profile_id,
327 scoped_refptr<const extensions::Extension> extension); 327 scoped_refptr<const extensions::Extension> extension);
328 328
329 // Whether a header is RFC 2616-compliant.
330 bool IsValidHeaderName(const std::string& name);
331 // Whether a header value does not contain NUL or CRLF.
332 bool IsValidHeaderValue(const std::string& value);
333
334 } // namespace extension_web_request_api_helpers 329 } // namespace extension_web_request_api_helpers
335 330
336 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ 331 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698