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

Side by Side Diff: chrome/browser/local_discovery/privet_http_impl.cc

Issue 318283002: Added new GCD/Privet interfaces. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/local_discovery/privet_http_impl.h" 5 #include "chrome/browser/local_discovery/privet_http_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 scoped_ptr<PrivetDataReadOperation> 942 scoped_ptr<PrivetDataReadOperation>
943 PrivetV1HTTPClientImpl::CreateStorageReadOperation( 943 PrivetV1HTTPClientImpl::CreateStorageReadOperation(
944 const std::string& path, 944 const std::string& path,
945 const PrivetDataReadOperation::ResultCallback& callback) { 945 const PrivetDataReadOperation::ResultCallback& callback) {
946 std::string url_param = 946 std::string url_param =
947 base::StringPrintf(kPrivetStorageParamPathFormat, path.c_str()); 947 base::StringPrintf(kPrivetStorageParamPathFormat, path.c_str());
948 return scoped_ptr<PrivetDataReadOperation>(new PrivetDataReadOperationImpl( 948 return scoped_ptr<PrivetDataReadOperation>(new PrivetDataReadOperationImpl(
949 info_client(), kPrivetStorageContentPath, url_param, callback)); 949 info_client(), kPrivetStorageContentPath, url_param, callback));
950 } 950 }
951 951
952 PrivetV3HTTPClientImpl::PrivetV3HTTPClientImpl(
953 scoped_ptr<PrivetHTTPClient> info_client)
954 : info_client_(info_client.Pass()) {
955 }
956
957 PrivetV3HTTPClientImpl::~PrivetV3HTTPClientImpl() {
958 }
959
960 const std::string& PrivetV3HTTPClientImpl::GetName() {
961 return info_client()->GetName();
962 }
963
964 scoped_ptr<PrivetJSONOperation> PrivetV3HTTPClientImpl::CreateInfoOperation(
965 const PrivetJSONOperation::ResultCallback& callback) {
966 return info_client()->CreateInfoOperation(callback);
967 }
968
952 } // namespace local_discovery 969 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698