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

Side by Side Diff: net/tools/flip_server/url_to_filename_encoder.h

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // URL filename encoder goals: 5 // URL filename encoder goals:
6 // 6 //
7 // 1. Allow URLs with arbitrary path-segment length, generating filenames 7 // 1. Allow URLs with arbitrary path-segment length, generating filenames
8 // with a maximum of 128 characters. 8 // with a maximum of 128 characters.
9 // 2. Provide a somewhat human readable filenames, for easy debugging flow. 9 // 2. Provide a somewhat human readable filenames, for easy debugging flow.
10 // 3. Provide reverse-mapping from filenames back to URLs. 10 // 3. Provide reverse-mapping from filenames back to URLs.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // /, /,2C, 72 // /, /,2C,
73 // /,./ /,2C./, 73 // /,./ /,2C./,
74 // /very...longname/ /very...long,-/name If very...long is about 126 long. 74 // /very...longname/ /very...long,-/name If very...long is about 126 long.
75 75
76 // NOTE: we avoid using some classes here (like FilePath and GURL) because we 76 // NOTE: we avoid using some classes here (like FilePath and GURL) because we
77 // share this code with other projects externally. 77 // share this code with other projects externally.
78 78
79 #ifndef NET_TOOLS_FLIP_SERVER_URL_TO_FILENAME_ENCODER_H_ 79 #ifndef NET_TOOLS_FLIP_SERVER_URL_TO_FILENAME_ENCODER_H_
80 #define NET_TOOLS_FLIP_SERVER_URL_TO_FILENAME_ENCODER_H_ 80 #define NET_TOOLS_FLIP_SERVER_URL_TO_FILENAME_ENCODER_H_
81 81
82 #include <stddef.h>
83
82 #include <string> 84 #include <string>
83 85
84 #include "base/strings/string_util.h" 86 #include "base/strings/string_util.h"
85 #include "net/tools/flip_server/url_utilities.h" 87 #include "net/tools/flip_server/url_utilities.h"
86 88
87 namespace net { 89 namespace net {
88 90
89 // Helper class for converting a URL into a filename. 91 // Helper class for converting a URL into a filename.
90 class UrlToFilenameEncoder { 92 class UrlToFilenameEncoder {
91 public: 93 public:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 static void StripDoubleSlashes(std::string* path) { 205 static void StripDoubleSlashes(std::string* path) {
204 const std::string doubleslash("\\\\"); 206 const std::string doubleslash("\\\\");
205 const std::string escaped_doubleslash("%5C%5C"); 207 const std::string escaped_doubleslash("%5C%5C");
206 ReplaceAll(path, doubleslash, escaped_doubleslash); 208 ReplaceAll(path, doubleslash, escaped_doubleslash);
207 } 209 }
208 }; 210 };
209 211
210 } // namespace net 212 } // namespace net
211 213
212 #endif // NET_TOOLS_FLIP_SERVER_URL_TO_FILENAME_ENCODER_H_ 214 #endif // NET_TOOLS_FLIP_SERVER_URL_TO_FILENAME_ENCODER_H_
OLDNEW
« no previous file with comments | « net/tools/flip_server/streamer_interface.cc ('k') | net/tools/flip_server/url_to_filename_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698