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

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

Issue 12208089: Changing CloudPrintURLFetcher instantiation to be more testable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated Gene's suggestions Created 7 years, 10 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 8338f2220609b75dfa6a0ede2114c974f762b47e..38b3d968b8cb1f9bfa9924404161630479b5d902 100644
--- a/chrome/service/cloud_print/cloud_print_connector.cc
+++ b/chrome/service/cloud_print/cloud_print_connector.cc
@@ -289,7 +289,7 @@ void CloudPrintConnector::StartGetRequest(const GURL& url,
int max_retries,
ResponseHandler handler) {
next_response_handler_ = handler;
- request_ = new CloudPrintURLFetcher;
+ request_ = CloudPrintURLFetcher::Create();
request_->StartGetRequest(url, this, max_retries, std::string());
}
@@ -299,7 +299,7 @@ void CloudPrintConnector::StartPostRequest(const GURL& url,
const std::string& post_data,
ResponseHandler handler) {
next_response_handler_ = handler;
- request_ = new CloudPrintURLFetcher;
+ request_ = CloudPrintURLFetcher::Create();
request_->StartPostRequest(
url, this, max_retries, mime_type, post_data, std::string());
}
@@ -318,7 +318,7 @@ void CloudPrintConnector::ReportUserMessage(const std::string& message_id,
post_data.append("--" + mime_boundary + "--\r\n");
std::string mime_type("multipart/form-data; boundary=");
mime_type += mime_boundary;
- user_message_request_ = new CloudPrintURLFetcher;
+ user_message_request_ = CloudPrintURLFetcher::Create();
user_message_request_->StartPostRequest(url, this, 1, mime_type, post_data,
std::string());
}
« no previous file with comments | « chrome/service/cloud_print/cloud_print_auth.cc ('k') | chrome/service/cloud_print/cloud_print_url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698