Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5585)

Unified Diff: chrome/service/cloud_print/cloud_print_connector.cc

Issue 15076008: Move AddMultipartValueForUpload to net/base/mime_util.h/cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Again (same as patch 1), hopefully diffs are OK now. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/service/cloud_print/cloud_print_connector.cc
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc
index 0e2e0ec3b3c20889643af9fdc2bdf6f107a98818..f2da59f1de22b77b5fa14f68f9fc7a368af92c29 100644
--- a/chrome/service/cloud_print/cloud_print_connector.cc
+++ b/chrome/service/cloud_print/cloud_print_connector.cc
@@ -17,6 +17,7 @@
#include "chrome/common/cloud_print/cloud_print_helpers.h"
#include "chrome/service/cloud_print/cloud_print_helpers.h"
#include "grit/generated_resources.h"
+#include "net/base/mime_util.h"
#include "ui/base/l10n/l10n_util.h"
namespace cloud_print {
@@ -313,8 +314,8 @@ void CloudPrintConnector::ReportUserMessage(const std::string& message_id,
CreateMimeBoundaryForUpload(&mime_boundary);
GURL url = GetUrlForUserMessage(settings_.server_url(), message_id);
std::string post_data;
- AddMultipartValueForUpload(kMessageTextValue, failure_msg, mime_boundary,
- std::string(), &post_data);
+ net::AddMultipartValueForUpload(kMessageTextValue, failure_msg, mime_boundary,
+ std::string(), &post_data);
// Terminate the request body
post_data.append("--" + mime_boundary + "--\r\n");
std::string mime_type("multipart/form-data; boundary=");
@@ -527,25 +528,25 @@ void CloudPrintConnector::OnReceivePrinterCaps(
CreateMimeBoundaryForUpload(&mime_boundary);
std::string post_data;
- AddMultipartValueForUpload(kProxyIdValue,
+ net::AddMultipartValueForUpload(kProxyIdValue,
settings_.proxy_id(), mime_boundary, std::string(), &post_data);
- AddMultipartValueForUpload(kPrinterNameValue,
+ net::AddMultipartValueForUpload(kPrinterNameValue,
info.printer_name, mime_boundary, std::string(), &post_data);
- AddMultipartValueForUpload(kPrinterDescValue,
+ net::AddMultipartValueForUpload(kPrinterDescValue,
info.printer_description, mime_boundary, std::string(), &post_data);
- AddMultipartValueForUpload(kPrinterStatusValue,
+ net::AddMultipartValueForUpload(kPrinterStatusValue,
base::StringPrintf("%d", info.printer_status),
mime_boundary, std::string(), &post_data);
post_data += GetPostDataForPrinterInfo(info, mime_boundary);
- AddMultipartValueForUpload(kPrinterCapsValue,
+ net::AddMultipartValueForUpload(kPrinterCapsValue,
caps_and_defaults.printer_capabilities, mime_boundary,
caps_and_defaults.caps_mime_type, &post_data);
- AddMultipartValueForUpload(kPrinterDefaultsValue,
+ net::AddMultipartValueForUpload(kPrinterDefaultsValue,
caps_and_defaults.printer_defaults, mime_boundary,
caps_and_defaults.defaults_mime_type, &post_data);
// Send a hash of the printer capabilities to the server. We will use this
// later to check if the capabilities have changed
- AddMultipartValueForUpload(kPrinterCapsHashValue,
+ net::AddMultipartValueForUpload(kPrinterCapsHashValue,
base::MD5String(caps_and_defaults.printer_capabilities),
mime_boundary, std::string(), &post_data);

Powered by Google App Engine
This is Rietveld 408576698