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

Unified Diff: base/cgi.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/build.scons ('k') | base/cgi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/cgi.h
diff --git a/base/cgi.h b/base/cgi.h
deleted file mode 100644
index bb78b083f052bdf16da600481c882ac6b1cf543b..0000000000000000000000000000000000000000
--- a/base/cgi.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2009 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ========================================================================
-
-#ifndef OMAHA_COMMON_CGI_H__
-#define OMAHA_COMMON_CGI_H__
-
-#include <tchar.h>
-
-namespace omaha {
-
-class CGI {
- public:
- // Maximum factor by which EscapeString() can increase the string length
- static const int kEscapeFactor = 3;
-
- // EscapeString() converts funky characters found in "src[0,srcn-1]" into
- // escape sequences. The escaped string is placed back in "dst". At most
- // "dstn" characters are written into "dst", including the
- // null-termination byte. Returns true if
- // successful, false if the escaped string will not fit entirely in "dstn"
- // characters. Since escaping can increase the length, "dst" should not
- // be the same as "src".
-
- // These functions always return a null-terminated string, even if they
- // fail (e.g. if a bad escape sequence is found). As a consequence, you
- // must pass in a dstn > 0.
- // If you want to guarantee that the result will fit, you need
- // dstn >= kEscapeFactor * srcn + 1
- // for EscapeString and
- // dstn >= srcn + 1
- // for UnescapeString.
-
- static bool EscapeString(const TCHAR* src, int srcn, TCHAR* dst, int dstn);
- static bool UnescapeString(const TCHAR* src, int srcn, TCHAR* dst, int dstn);
-};
-
-} // namespace omaha
-
-#endif // OMAHA_COMMON_CGI_H__
« no previous file with comments | « base/build.scons ('k') | base/cgi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698