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

Unified Diff: chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.cc

Issue 1553333002: Move cloud print specific files out of local_discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveprn
Patch Set: Created 4 years, 11 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/browser/local_discovery/privet_http_asynchronous_factory_impl.cc
diff --git a/chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.cc b/chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.cc
deleted file mode 100644
index 684b60676b5ad123dadd5ea2e34861eea5a3fdad..0000000000000000000000000000000000000000
--- a/chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.h"
-
-#include "chrome/browser/local_discovery/endpoint_resolver.h"
-#include "chrome/browser/local_discovery/privet_http_impl.h"
-
-namespace local_discovery {
-
-PrivetHTTPAsynchronousFactoryImpl::PrivetHTTPAsynchronousFactoryImpl(
- net::URLRequestContextGetter* request_context)
- : request_context_(request_context) {
-}
-
-PrivetHTTPAsynchronousFactoryImpl::~PrivetHTTPAsynchronousFactoryImpl() {
-}
-
-scoped_ptr<PrivetHTTPResolution>
-PrivetHTTPAsynchronousFactoryImpl::CreatePrivetHTTP(
- const std::string& service_name) {
- return scoped_ptr<PrivetHTTPResolution>(
- new ResolutionImpl(service_name, request_context_.get()));
-}
-
-PrivetHTTPAsynchronousFactoryImpl::ResolutionImpl::ResolutionImpl(
- const std::string& service_name,
- net::URLRequestContextGetter* request_context)
- : name_(service_name),
- request_context_(request_context),
- endpoint_resolver_(new EndpointResolver()) {}
-
-PrivetHTTPAsynchronousFactoryImpl::ResolutionImpl::~ResolutionImpl() {
-}
-
-const std::string&
-PrivetHTTPAsynchronousFactoryImpl::ResolutionImpl::GetName() {
- return name_;
-}
-
-void PrivetHTTPAsynchronousFactoryImpl::ResolutionImpl::Start(
- const ResultCallback& callback) {
- endpoint_resolver_->Start(name_,
- base::Bind(&ResolutionImpl::ResolveComplete,
- base::Unretained(this), callback));
-}
-
-void PrivetHTTPAsynchronousFactoryImpl::ResolutionImpl::Start(
- const net::HostPortPair& address,
- const ResultCallback& callback) {
- endpoint_resolver_->Start(address,
- base::Bind(&ResolutionImpl::ResolveComplete,
- base::Unretained(this), callback));
-}
-
-void PrivetHTTPAsynchronousFactoryImpl::ResolutionImpl::ResolveComplete(
- const ResultCallback& callback,
- const net::IPEndPoint& endpoint) {
- if (endpoint.address().empty())
- return callback.Run(scoped_ptr<PrivetHTTPClient>());
-
- net::HostPortPair new_address = net::HostPortPair::FromIPEndPoint(endpoint);
- callback.Run(scoped_ptr<PrivetHTTPClient>(
- new PrivetHTTPClientImpl(name_, new_address, request_context_.get())));
-}
-
-} // namespace local_discovery

Powered by Google App Engine
This is Rietveld 408576698