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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 320683002: Extracted PrivetV1HTTPClient with Privet v1 specific operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_handler.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index ede72df37b251a56a0025d905d9bcd6b5f484506..6bd1ffb7a1cad48c34a3f421e8200b47b02c4d47 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -1431,7 +1431,8 @@ bool PrintPreviewHandler::PrivetUpdateClient(
privet_local_print_operation_.reset();
privet_capabilities_operation_.reset();
- privet_http_client_ = http_client.Pass();
+ privet_http_client_ =
+ local_discovery::PrivetV1HTTPClient::CreateDefault(http_client.Pass());
privet_http_resolution_.reset();
@@ -1536,7 +1537,7 @@ void PrintPreviewHandler::PrintToPrivetPrinter(const std::string& device_name,
bool PrintPreviewHandler::CreatePrivetHTTP(
const std::string& name,
const local_discovery::PrivetHTTPAsynchronousFactory::ResultCallback&
- callback) {
+ callback) {
const local_discovery::DeviceDescription* device_description =
printer_lister_->GetDeviceDescription(name);
@@ -1547,12 +1548,10 @@ bool PrintPreviewHandler::CreatePrivetHTTP(
privet_http_factory_ =
local_discovery::PrivetHTTPAsynchronousFactory::CreateInstance(
- service_discovery_client_,
- Profile::FromWebUI(web_ui())->GetRequestContext());
+ service_discovery_client_,
+ Profile::FromWebUI(web_ui())->GetRequestContext());
privet_http_resolution_ = privet_http_factory_->CreatePrivetHTTP(
- name,
- device_description->address,
- callback);
+ name, device_description->address, callback);
privet_http_resolution_->Start();
return true;
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_handler.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698