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

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

Issue 370833002: Move resource_type.* from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fix Created 6 years, 5 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 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 14 matching lines...) Expand all
25 #include "net/cookies/cookie_util.h" 25 #include "net/cookies/cookie_util.h"
26 #include "net/cookies/parsed_cookie.h" 26 #include "net/cookies/parsed_cookie.h"
27 #include "net/http/http_util.h" 27 #include "net/http/http_util.h"
28 #include "net/url_request/url_request.h" 28 #include "net/url_request/url_request.h"
29 #include "url/url_constants.h" 29 #include "url/url_constants.h"
30 30
31 // TODO(battre): move all static functions into an anonymous namespace at the 31 // TODO(battre): move all static functions into an anonymous namespace at the
32 // top of this file. 32 // top of this file.
33 33
34 using base::Time; 34 using base::Time;
35 using content::ResourceType;
35 using extensions::ExtensionWarning; 36 using extensions::ExtensionWarning;
36 37
37 namespace extension_web_request_api_helpers { 38 namespace extension_web_request_api_helpers {
38 39
39 namespace { 40 namespace {
40 41
41 // A ParsedRequestCookie consists of the key and value of the cookie. 42 // A ParsedRequestCookie consists of the key and value of the cookie.
42 typedef std::pair<base::StringPiece, base::StringPiece> ParsedRequestCookie; 43 typedef std::pair<base::StringPiece, base::StringPiece> ParsedRequestCookie;
43 typedef std::vector<ParsedRequestCookie> ParsedRequestCookies; 44 typedef std::vector<ParsedRequestCookie> ParsedRequestCookies;
44 typedef std::vector<linked_ptr<net::ParsedCookie> > ParsedResponseCookies; 45 typedef std::vector<linked_ptr<net::ParsedCookie> > ParsedResponseCookies;
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 return net::HttpUtil::IsToken(name); 1315 return net::HttpUtil::IsToken(name);
1315 } 1316 }
1316 1317
1317 bool IsValidHeaderValue(const std::string& value) { 1318 bool IsValidHeaderValue(const std::string& value) {
1318 // Just a sanity check: disallow NUL and CRLF. 1319 // Just a sanity check: disallow NUL and CRLF.
1319 return value.find('\0') == std::string::npos && 1320 return value.find('\0') == std::string::npos &&
1320 value.find("\r\n") == std::string::npos; 1321 value.find("\r\n") == std::string::npos;
1321 } 1322 }
1322 1323
1323 } // namespace extension_web_request_api_helpers 1324 } // namespace extension_web_request_api_helpers
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698