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

Side by Side Diff: net/tools/flip_server/spdy_util.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/tools/flip_server/spdy_util.h ('k') | net/tools/flip_server/streamer_interface.h » ('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 #include "net/tools/flip_server/spdy_util.h"
6
7 #include <string>
8
9 #include "net/tools/dump_cache/url_to_filename_encoder.h"
10
11 namespace net {
12
13 bool g_need_to_encode_url = false;
14
15 // Encode the URL.
16 std::string EncodeURL(std::string uri, std::string host, std::string method) {
17 if (!g_need_to_encode_url) {
18 // TODO(mbelshe): if uri is fully qualified, need to strip protocol/host.
19 return std::string(method + "_" + uri);
20 }
21
22 std::string filename;
23 if (uri[0] == '/') {
24 // uri is not fully qualified.
25 filename = UrlToFilenameEncoder::Encode(
26 "http://" + host + uri, method + "_/", false);
27 } else {
28 filename = UrlToFilenameEncoder::Encode(uri, method + "_/", false);
29 }
30 return filename;
31 }
32
33 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/flip_server/spdy_util.h ('k') | net/tools/flip_server/streamer_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698