diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 21:32:51 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 21:32:51 +0000 |
commit | 545252a40e5a570e70e671e26c34a31545027fc8 (patch) | |
tree | dab90754a444de47f393ac13270c1893b39b3505 | |
parent | 763f848ffbd28b22a6c2aa32bf28184d9c17b366 (diff) | |
download | chromium_src-545252a40e5a570e70e671e26c34a31545027fc8.zip chromium_src-545252a40e5a570e70e671e26c34a31545027fc8.tar.gz chromium_src-545252a40e5a570e70e671e26c34a31545027fc8.tar.bz2 |
Added the X-Google-CloudPrint-Proxy: header to all cloud print proxy requests.
BUG=None.
TEST=Check Cloud Print proxy request headers to ensure that the X-Google-CloudPrint-Proxy: header exists.
Review URL: http://codereview.chromium.org/3522009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61238 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/service/cloud_print/cloud_print_consts.cc | 3 | ||||
-rw-r--r-- | chrome/service/cloud_print/cloud_print_consts.h | 2 | ||||
-rw-r--r-- | chrome/service/cloud_print/cloud_print_helpers.cc | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/chrome/service/cloud_print/cloud_print_consts.cc b/chrome/service/cloud_print/cloud_print_consts.cc index c86e5ee..0974205 100644 --- a/chrome/service/cloud_print/cloud_print_consts.cc +++ b/chrome/service/cloud_print/cloud_print_consts.cc @@ -37,4 +37,7 @@ const char kGaiaUrl[] = "https://www.google.com/accounts/ClientLogin"; const char kCloudPrintGaiaServiceId[] = "cloudprint"; const char kSyncGaiaServiceId[] = "chromiumsync"; const char kCloudPrintPushNotificationsSource[] = "cloudprint.google.com"; +// The cloud print server expects the X-Google-CloudPrint-Proxy header for +// certain requests. +const char kChromeCloudPrintProxyHeader[] = "X-Google-CloudPrint-Proxy: Chrome"; diff --git a/chrome/service/cloud_print/cloud_print_consts.h b/chrome/service/cloud_print/cloud_print_consts.h index 1211571..0e98b94 100644 --- a/chrome/service/cloud_print/cloud_print_consts.h +++ b/chrome/service/cloud_print/cloud_print_consts.h @@ -37,7 +37,7 @@ extern const char kGaiaUrl[]; extern const char kCloudPrintGaiaServiceId[]; extern const char kSyncGaiaServiceId[]; extern const char kCloudPrintPushNotificationsSource[]; - +extern const char kChromeCloudPrintProxyHeader[]; // Max interval between retrying connection to the server const int64 kMaxRetryInterval = 5*60*1000; // 5 minutes in millseconds const int64 kBaseRetryInterval = 5*1000; // 5 seconds diff --git a/chrome/service/cloud_print/cloud_print_helpers.cc b/chrome/service/cloud_print/cloud_print_helpers.cc index d101f0e..fc132672 100644 --- a/chrome/service/cloud_print/cloud_print_helpers.cc +++ b/chrome/service/cloud_print/cloud_print_helpers.cc @@ -161,6 +161,8 @@ void CloudPrintHelpers::PrepCloudPrintRequest(URLFetcher* request, request->set_request_context(new ServiceURLRequestContextGetter()); std::string headers = "Authorization: GoogleLogin auth="; headers += auth_token; + headers += "\r\n"; + headers += kChromeCloudPrintProxyHeader; request->set_extra_request_headers(headers); } |