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

Side by Side Diff: chrome/browser/chromeos/web_socket_proxy.cc

Issue 8552002: net: Move UnescapeRule into the net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/web_socket_proxy.h" 5 #include "chrome/browser/chromeos/web_socket_proxy.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 return STATUS_ABORT; 1245 return STATUS_ABORT;
1246 if (resource_end != buf + strlen(kGetPrefix)) { 1246 if (resource_end != buf + strlen(kGetPrefix)) {
1247 char* piece = reinterpret_cast<char*>(buf) + strlen(kGetPrefix) + 1; 1247 char* piece = reinterpret_cast<char*>(buf) + strlen(kGetPrefix) + 1;
1248 url_parse::Component query( 1248 url_parse::Component query(
1249 0, resource_end - reinterpret_cast<uint8*>(piece)); 1249 0, resource_end - reinterpret_cast<uint8*>(piece));
1250 for (url_parse::Component key, value; 1250 for (url_parse::Component key, value;
1251 url_parse::ExtractQueryKeyValue(piece, &query, &key, &value);) { 1251 url_parse::ExtractQueryKeyValue(piece, &query, &key, &value);) {
1252 if (key.len > 0) { 1252 if (key.len > 0) {
1253 requested_parameters_[std::string(piece + key.begin, key.len)] = 1253 requested_parameters_[std::string(piece + key.begin, key.len)] =
1254 net::UnescapeURLComponent(std::string(piece + value.begin, 1254 net::UnescapeURLComponent(std::string(piece + value.begin,
1255 value.len), UnescapeRule::URL_SPECIAL_CHARS); 1255 value.len), net::UnescapeRule::URL_SPECIAL_CHARS);
1256 } 1256 }
1257 } 1257 }
1258 } 1258 }
1259 for (uint8* pos = get_request_end;;) { 1259 for (uint8* pos = get_request_end;;) {
1260 pos += strlen(kCRLF); 1260 pos += strlen(kCRLF);
1261 if (term_pos - pos < static_cast<ptrdiff_t>(strlen(kCRLF))) 1261 if (term_pos - pos < static_cast<ptrdiff_t>(strlen(kCRLF)))
1262 return STATUS_ABORT; 1262 return STATUS_ABORT;
1263 if (term_pos - pos == static_cast<ptrdiff_t>(strlen(kCRLF))) 1263 if (term_pos - pos == static_cast<ptrdiff_t>(strlen(kCRLF)))
1264 break; 1264 break;
1265 uint8* npos = std::search(pos, term_pos, kKeyValueDelimiter, 1265 uint8* npos = std::search(pos, term_pos, kKeyValueDelimiter,
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 1929
1930 void WebSocketProxy::Shutdown() { 1930 void WebSocketProxy::Shutdown() {
1931 static_cast<Serv*>(impl_)->Shutdown(); 1931 static_cast<Serv*>(impl_)->Shutdown();
1932 } 1932 }
1933 1933
1934 void WebSocketProxy::OnNetworkChange() { 1934 void WebSocketProxy::OnNetworkChange() {
1935 static_cast<Serv*>(impl_)->OnNetworkChange(); 1935 static_cast<Serv*>(impl_)->OnNetworkChange();
1936 } 1936 }
1937 1937
1938 } // namespace chromeos 1938 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/extensions/extension_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698