| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sync/engine/net/url_translator.h" | 8 #include "sync/engine/net/url_translator.h" |
| 9 | 9 |
| 10 #include "base/basictypes.h" | |
| 11 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
| 12 | 11 |
| 13 using std::string; | 12 using std::string; |
| 14 | 13 |
| 15 namespace syncer { | 14 namespace syncer { |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 // Parameters that the server understands. (here, a-Z) | 17 // Parameters that the server understands. (here, a-Z) |
| 19 const char kParameterClient[] = "client"; | 18 const char kParameterClient[] = "client"; |
| 20 const char kParameterClientID[] = "client_id"; | 19 const char kParameterClientID[] = "client_id"; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 string query; | 46 string query; |
| 48 query += kParameterClient; | 47 query += kParameterClient; |
| 49 query += "=" + CgiEscapeString(kClientName); | 48 query += "=" + CgiEscapeString(kClientName); |
| 50 query += "&"; | 49 query += "&"; |
| 51 query += kParameterClientID; | 50 query += kParameterClientID; |
| 52 query += "=" + CgiEscapeString(client_id); | 51 query += "=" + CgiEscapeString(client_id); |
| 53 return query; | 52 return query; |
| 54 } | 53 } |
| 55 | 54 |
| 56 } // namespace syncer | 55 } // namespace syncer |
| OLD | NEW |