| Index: chrome/browser/chrome_process_finder_win.cc
|
| diff --git a/chrome/browser/chrome_process_finder_win.cc b/chrome/browser/chrome_process_finder_win.cc
|
| index 1be25babb3581d63d03dc0ccc7eeb0ee5e10c26d..13c4a0eb5a56c5ca2f1afa70ecb0a3e223c5ac9d 100644
|
| --- a/chrome/browser/chrome_process_finder_win.cc
|
| +++ b/chrome/browser/chrome_process_finder_win.cc
|
| @@ -17,11 +17,9 @@
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/win/message_window.h"
|
| -#include "base/win/metro.h"
|
| #include "base/win/scoped_handle.h"
|
| #include "base/win/win_util.h"
|
| #include "base/win/windows_version.h"
|
| -#include "chrome/browser/metro_utils/metro_chrome_win.h"
|
| #include "chrome/common/chrome_constants.h"
|
| #include "chrome/common/chrome_switches.h"
|
|
|
| @@ -30,70 +28,6 @@ namespace {
|
|
|
| int timeout_in_milliseconds = 20 * 1000;
|
|
|
| -// The following is copied from net/base/escape.cc. We don't want to depend on
|
| -// net here because this gets compiled into chrome.exe to facilitate
|
| -// fast-rendezvous (see https://codereview.chromium.org/14617003/).
|
| -
|
| -// TODO(koz): Move these functions out of net/base/escape.cc into base/escape.cc
|
| -// so we can depend on it directly.
|
| -
|
| -// BEGIN COPY from net/base/escape.cc
|
| -
|
| -// A fast bit-vector map for ascii characters.
|
| -//
|
| -// Internally stores 256 bits in an array of 8 ints.
|
| -// Does quick bit-flicking to lookup needed characters.
|
| -struct Charmap {
|
| - bool Contains(unsigned char c) const {
|
| - return ((map[c >> 5] & (1 << (c & 31))) != 0);
|
| - }
|
| -
|
| - uint32 map[8];
|
| -};
|
| -
|
| -const char kHexString[] = "0123456789ABCDEF";
|
| -inline char IntToHex(int i) {
|
| - DCHECK_GE(i, 0) << i << " not a hex value";
|
| - DCHECK_LE(i, 15) << i << " not a hex value";
|
| - return kHexString[i];
|
| -}
|
| -
|
| -// Given text to escape and a Charmap defining which values to escape,
|
| -// return an escaped string. If use_plus is true, spaces are converted
|
| -// to +, otherwise, if spaces are in the charmap, they are converted to
|
| -// %20.
|
| -std::string Escape(const std::string& text, const Charmap& charmap,
|
| - bool use_plus) {
|
| - std::string escaped;
|
| - escaped.reserve(text.length() * 3);
|
| - for (unsigned int i = 0; i < text.length(); ++i) {
|
| - unsigned char c = static_cast<unsigned char>(text[i]);
|
| - if (use_plus && ' ' == c) {
|
| - escaped.push_back('+');
|
| - } else if (charmap.Contains(c)) {
|
| - escaped.push_back('%');
|
| - escaped.push_back(IntToHex(c >> 4));
|
| - escaped.push_back(IntToHex(c & 0xf));
|
| - } else {
|
| - escaped.push_back(c);
|
| - }
|
| - }
|
| - return escaped;
|
| -}
|
| -
|
| -// Everything except alphanumerics and !'()*-._~
|
| -// See RFC 2396 for the list of reserved characters.
|
| -static const Charmap kQueryCharmap = {{
|
| - 0xffffffffL, 0xfc00987dL, 0x78000001L, 0xb8000001L,
|
| - 0xffffffffL, 0xffffffffL, 0xffffffffL, 0xffffffffL
|
| -}};
|
| -
|
| -std::string EscapeQueryParamValue(const std::string& text, bool use_plus) {
|
| - return Escape(text, kQueryCharmap, use_plus);
|
| -}
|
| -
|
| -// END COPY from net/base/escape.cc
|
| -
|
| } // namespace
|
|
|
| namespace chrome {
|
|
|