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

Side by Side Diff: chrome/browser/sync/engine/net/url_translator.cc

Issue 244056: Add EscapeURL to the ASCII escape methods.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/escape.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 // Contains the definition of a few helper functions used for generating sync 5 // Contains the definition of a few helper functions used for generating sync
6 // URLs. 6 // URLs.
7 7
8 #include "chrome/browser/sync/engine/net/url_translator.h" 8 #include "chrome/browser/sync/engine/net/url_translator.h"
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 const char kParameterAuthToken[] = "auth"; 22 const char kParameterAuthToken[] = "auth";
23 const char kParameterClientID[] = "client_id"; 23 const char kParameterClientID[] = "client_id";
24 } 24 }
25 25
26 // Convenience wrappers around CgiEscapePath(). 26 // Convenience wrappers around CgiEscapePath().
27 string CgiEscapeString(const char* src) { 27 string CgiEscapeString(const char* src) {
28 return CgiEscapeString(string(src)); 28 return CgiEscapeString(string(src));
29 } 29 }
30 30
31 string CgiEscapeString(const string& src) { 31 string CgiEscapeString(const string& src) {
32 return EscapePath(src); 32 return EscapeUrl(src);
33 } 33 }
34 34
35 // This method appends the query string to the sync server path. 35 // This method appends the query string to the sync server path.
36 string MakeSyncServerPath(const string& path, const string& query_string) { 36 string MakeSyncServerPath(const string& path, const string& query_string) {
37 string result = path; 37 string result = path;
38 result.append("?"); 38 result.append("?");
39 result.append(query_string); 39 result.append(query_string);
40 return result; 40 return result;
41 } 41 }
42 42
43 string MakeSyncQueryString(const string& client_id) { 43 string MakeSyncQueryString(const string& client_id) {
44 string query; 44 string query;
45 query += kParameterClientID; 45 query += kParameterClientID;
46 query += "=" + CgiEscapeString(client_id); 46 query += "=" + CgiEscapeString(client_id);
47 return query; 47 return query;
48 } 48 }
49 49
50 } // namespace browser_sync 50 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | net/base/escape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698