diff options
author | noamsml@chromium.org <noamsml@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 08:59:57 +0000 |
---|---|---|
committer | noamsml@chromium.org <noamsml@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 08:59:57 +0000 |
commit | 8535bed9551a87726535a2efc6ebaedf803bfd1b (patch) | |
tree | e7e5c79f900942af65b8d535b210d757eda89617 /cloud_print | |
parent | 35b3feac6f74978ad5e659f538546dedf184521e (diff) | |
download | chromium_src-8535bed9551a87726535a2efc6ebaedf803bfd1b.zip chromium_src-8535bed9551a87726535a2efc6ebaedf803bfd1b.tar.gz chromium_src-8535bed9551a87726535a2efc6ebaedf803bfd1b.tar.bz2 |
Fix issue with GCP 2.0 prototype
Fix issue where GCP 2.0 prototype stopped working due to server-side
changes. Add newly-required parameters.
BUG=
Review URL: https://codereview.chromium.org/51853002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r-- | cloud_print/gcp20/prototype/cloud_print_requester.cc | 29 | ||||
-rw-r--r-- | cloud_print/gcp20/prototype/privet_http_server.cc | 2 |
2 files changed, 28 insertions, 3 deletions
diff --git a/cloud_print/gcp20/prototype/cloud_print_requester.cc b/cloud_print/gcp20/prototype/cloud_print_requester.cc index ec40489..ade85efc 100644 --- a/cloud_print/gcp20/prototype/cloud_print_requester.cc +++ b/cloud_print/gcp20/prototype/cloud_print_requester.cc @@ -31,6 +31,16 @@ const char kPrinterCapsHashValue[] = "capsHash"; const char kPrinterUserValue[] = "user"; const char kPrinterGcpVersion[] = "gcp_version"; const char kPrinterLocalSettings[] = "local_settings"; +const char kPrinterFirmware[] = "firmware"; +const char kPrinterManufacturer[] = "manufacturer"; +const char kPrinterModel[] = "model"; +const char kPrinterSetupUrl[] = "setup_url"; +const char kPrinterSupportUrl[] = "support_url"; +const char kPrinterUpdateUrl[] = "update_url"; + +const char kFirmwareValue[] = "2.0"; +const char kManufacturerValue[] = "Google"; +const char kModelValue[] = "GCPPrototype"; // TODO(maksymb): Replace GCP Version with "2.0" once GCP Server will support it const char kGcpVersion[] = "1.5"; @@ -140,6 +150,24 @@ void CloudPrintRequester::StartRegistration(const std::string& proxy_id, net::AddMultipartValueForUpload(kPrinterLocalSettings, LocalSettingsToJson(settings), mime_boundary, std::string(), &data); + net::AddMultipartValueForUpload(kPrinterFirmware, + kFirmwareValue, + mime_boundary, std::string(), &data); + net::AddMultipartValueForUpload(kPrinterManufacturer, + kManufacturerValue, + mime_boundary, std::string(), &data); + net::AddMultipartValueForUpload(kPrinterModel, + kModelValue, + mime_boundary, std::string(), &data); + net::AddMultipartValueForUpload(kPrinterSetupUrl, + kCloudPrintUrl, + mime_boundary, std::string(), &data); + net::AddMultipartValueForUpload(kPrinterSupportUrl, + kCloudPrintUrl, + mime_boundary, std::string(), &data); + net::AddMultipartValueForUpload(kPrinterUpdateUrl, + kCloudPrintUrl, + mime_boundary, std::string(), &data); net::AddMultipartFinalDelimiterForUpload(mime_boundary, &data); request_ = CreatePost( @@ -438,4 +466,3 @@ void CloudPrintRequester::ParseLocalSettingUpdated( const std::string& response) { delegate_->OnLocalSettingsUpdated(); } - diff --git a/cloud_print/gcp20/prototype/privet_http_server.cc b/cloud_print/gcp20/prototype/privet_http_server.cc index 4251a4fe..161d7d9 100644 --- a/cloud_print/gcp20/prototype/privet_http_server.cc +++ b/cloud_print/gcp20/prototype/privet_http_server.cc @@ -20,7 +20,6 @@ const int kPendingUserActionTimeout = 5; // in seconds const char kPrivetInfo[] = "/privet/info"; const char kPrivetRegister[] = "/privet/register"; -const char kPrivetAccessToken[] = "/privet/accesstoken"; const char kPrivetCapabilities[] = "/privet/capabilities"; const char kPrivetPrinterCreateJob[] = "/privet/printer/createjob"; const char kPrivetPrinterSubmitDoc[] = "/privet/printer/submitdoc"; @@ -503,4 +502,3 @@ void PrivetHttpServer::ProcessRegistrationStatus( NOTREACHED(); }; } - |