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