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

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

Issue 215573003: Send an empty Privet token with /privet/info always (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | chrome/browser/local_discovery/privet_url_fetcher.h » ('j') | 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 PrivetInfoOperationImpl::~PrivetInfoOperationImpl() { 92 PrivetInfoOperationImpl::~PrivetInfoOperationImpl() {
93 } 93 }
94 94
95 void PrivetInfoOperationImpl::Start() { 95 void PrivetInfoOperationImpl::Start() {
96 url_fetcher_ = privet_client_->CreateURLFetcher( 96 url_fetcher_ = privet_client_->CreateURLFetcher(
97 CreatePrivetURL(kPrivetInfoPath), net::URLFetcher::GET, this); 97 CreatePrivetURL(kPrivetInfoPath), net::URLFetcher::GET, this);
98 98
99 url_fetcher_->DoNotRetryOnTransientError(); 99 url_fetcher_->DoNotRetryOnTransientError();
100 url_fetcher_->AllowEmptyPrivetToken(); 100 url_fetcher_->SendEmptyPrivetToken();
101 101
102 url_fetcher_->Start(); 102 url_fetcher_->Start();
103 } 103 }
104 104
105 PrivetHTTPClient* PrivetInfoOperationImpl::GetHTTPClient() { 105 PrivetHTTPClient* PrivetInfoOperationImpl::GetHTTPClient() {
106 return privet_client_; 106 return privet_client_;
107 } 107 }
108 108
109 void PrivetInfoOperationImpl::OnError(PrivetURLFetcher* fetcher, 109 void PrivetInfoOperationImpl::OnError(PrivetURLFetcher* fetcher,
110 PrivetURLFetcher::ErrorType error) { 110 PrivetURLFetcher::ErrorType error) {
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 TokenCallbackVector token_callbacks; 924 TokenCallbackVector token_callbacks;
925 token_callbacks_.swap(token_callbacks); 925 token_callbacks_.swap(token_callbacks);
926 926
927 for (TokenCallbackVector::iterator i = token_callbacks.begin(); 927 for (TokenCallbackVector::iterator i = token_callbacks.begin();
928 i != token_callbacks.end(); i++) { 928 i != token_callbacks.end(); i++) {
929 i->Run(token); 929 i->Run(token);
930 } 930 }
931 } 931 }
932 932
933 } // namespace local_discovery 933 } // namespace local_discovery
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698