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

Side by Side Diff: net/http/http_util_icu.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/http/http_util.cc ('k') | net/http/http_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // The rules for parsing content-types were borrowed from Firefox:
6 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834
7
8 #include "net/http/http_util.h"
9
10 #include "base/logging.h"
11 #include "net/base/net_util.h"
12
13 namespace net {
14
15 // static
16 std::string HttpUtil::PathForRequest(const GURL& url) {
17 DCHECK(url.is_valid() && (url.SchemeIsHTTPOrHTTPS() ||
18 url.SchemeIsWSOrWSS()));
19 if (url.has_query())
20 return url.path() + "?" + url.query();
21 return url.path();
22 }
23
24 // static
25 std::string HttpUtil::SpecForRequest(const GURL& url) {
26 // We may get ftp scheme when fetching ftp resources through proxy.
27 DCHECK(url.is_valid() && (url.SchemeIsHTTPOrHTTPS() || url.SchemeIs("ftp") ||
28 url.SchemeIsWSOrWSS()));
29 return SimplifyUrlForRequest(url).spec();
30 }
31
32 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_util.cc ('k') | net/http/http_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698