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

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

Issue 140843005: Remove unused var. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 return name_; 731 return name_;
732 } 732 }
733 733
734 scoped_ptr<PrivetURLFetcher> PrivetHTTPClientImpl::CreateURLFetcher( 734 scoped_ptr<PrivetURLFetcher> PrivetHTTPClientImpl::CreateURLFetcher(
735 const GURL& url, net::URLFetcher::RequestType request_type, 735 const GURL& url, net::URLFetcher::RequestType request_type,
736 PrivetURLFetcher::Delegate* delegate) const { 736 PrivetURLFetcher::Delegate* delegate) const {
737 GURL::Replacements replacements; 737 GURL::Replacements replacements;
738 replacements.SetHostStr(host_port_.host()); 738 replacements.SetHostStr(host_port_.host());
739 std::string port(base::IntToString(host_port_.port())); // Keep string alive. 739 std::string port(base::IntToString(host_port_.port())); // Keep string alive.
740 replacements.SetPortStr(port); 740 replacements.SetPortStr(port);
741 GURL url2 = url.ReplaceComponents(replacements);
742 return fetcher_factory_.CreateURLFetcher(url.ReplaceComponents(replacements), 741 return fetcher_factory_.CreateURLFetcher(url.ReplaceComponents(replacements),
743 request_type, delegate); 742 request_type, delegate);
744 } 743 }
745 744
746 void PrivetHTTPClientImpl::CacheInfo(const base::DictionaryValue* cached_info) { 745 void PrivetHTTPClientImpl::CacheInfo(const base::DictionaryValue* cached_info) {
747 cached_info_.reset(cached_info->DeepCopy()); 746 cached_info_.reset(cached_info->DeepCopy());
748 std::string token; 747 std::string token;
749 if (cached_info_->GetString(kPrivetInfoKeyToken, &token)) { 748 if (cached_info_->GetString(kPrivetInfoKeyToken, &token)) {
750 fetcher_factory_.set_token(token); 749 fetcher_factory_.set_token(token);
751 } 750 }
(...skipping 29 matching lines...) Expand all
781 TokenCallbackVector token_callbacks; 780 TokenCallbackVector token_callbacks;
782 token_callbacks_.swap(token_callbacks); 781 token_callbacks_.swap(token_callbacks);
783 782
784 for (TokenCallbackVector::iterator i = token_callbacks.begin(); 783 for (TokenCallbackVector::iterator i = token_callbacks.begin();
785 i != token_callbacks.end(); i++) { 784 i != token_callbacks.end(); i++) {
786 i->Run(token); 785 i->Run(token);
787 } 786 }
788 } 787 }
789 788
790 } // namespace local_discovery 789 } // namespace local_discovery
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698