diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 04:15:23 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 04:15:23 +0000 |
commit | 1fe601a911b4a219710dbdd2c799fd5243ceba95 (patch) | |
tree | c082e358c3b70182aa71341473429ba97460d97f /sync | |
parent | d8327eaaf69517a54e7ae83a00f12342e5fd47ce (diff) | |
download | chromium_src-1fe601a911b4a219710dbdd2c799fd5243ceba95.zip chromium_src-1fe601a911b4a219710dbdd2c799fd5243ceba95.tar.gz chromium_src-1fe601a911b4a219710dbdd2c799fd5243ceba95.tar.bz2 |
Add 'client' parameter to sync requests
Adds a parameter 'client' with value 'Chromium' or 'Google Chrome'.
Also removes an obsolete parameter string, kParameterAuthToken.
BUG=
TEST=
Review URL: http://codereview.chromium.org/9694051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r-- | sync/engine/net/url_translator.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sync/engine/net/url_translator.cc b/sync/engine/net/url_translator.cc index 90b7794..4602bda 100644 --- a/sync/engine/net/url_translator.cc +++ b/sync/engine/net/url_translator.cc @@ -17,8 +17,14 @@ namespace browser_sync { namespace { // Parameters that the server understands. (here, a-Z) -const char kParameterAuthToken[] = "auth"; +const char kParameterClient[] = "client"; const char kParameterClientID[] = "client_id"; + +#if defined(GOOGLE_CHROME_BUILD) +const char kClientName[] = "Google Chrome"; +#else +const char kClientName[] = "Chromium"; +#endif // defined(GOOGLE_CHROME_BUILD) } // Convenience wrappers around CgiEscapePath(). @@ -40,6 +46,9 @@ string MakeSyncServerPath(const string& path, const string& query_string) { string MakeSyncQueryString(const string& client_id) { string query; + query += kParameterClient; + query += "=" + CgiEscapeString(kClientName); + query += "&"; query += kParameterClientID; query += "=" + CgiEscapeString(client_id); return query; |