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

Side by Side Diff: remoting/host/token_validator_base.cc

Issue 502123003: Remove implicit conversions from scoped_refptr to T* in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « remoting/host/setup/oauth_client.cc ('k') | remoting/host/video_frame_recorder.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "remoting/host/token_validator_base.h" 5 #include "remoting/host/token_validator_base.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void TokenValidatorBase::OnCertificatesSelected( 140 void TokenValidatorBase::OnCertificatesSelected(
141 net::CertificateList* selected_certs, 141 net::CertificateList* selected_certs,
142 net::ClientCertStore* unused) { 142 net::ClientCertStore* unused) {
143 const std::string& issuer = 143 const std::string& issuer =
144 third_party_auth_config_.token_validation_cert_issuer; 144 third_party_auth_config_.token_validation_cert_issuer;
145 if (request_) { 145 if (request_) {
146 for (size_t i = 0; i < selected_certs->size(); ++i) { 146 for (size_t i = 0; i < selected_certs->size(); ++i) {
147 if (issuer == kCertIssuerWildCard || 147 if (issuer == kCertIssuerWildCard ||
148 issuer == (*selected_certs)[i]->issuer().common_name) { 148 issuer == (*selected_certs)[i]->issuer().common_name) {
149 request_->ContinueWithCertificate((*selected_certs)[i]); 149 request_->ContinueWithCertificate((*selected_certs)[i].get());
150 return; 150 return;
151 } 151 }
152 } 152 }
153 request_->ContinueWithCertificate(NULL); 153 request_->ContinueWithCertificate(NULL);
154 } 154 }
155 } 155 }
156 156
157 bool TokenValidatorBase::IsValidScope(const std::string& token_scope) { 157 bool TokenValidatorBase::IsValidScope(const std::string& token_scope) {
158 // TODO(rmsousa): Deal with reordering/subsets/supersets/aliases/etc. 158 // TODO(rmsousa): Deal with reordering/subsets/supersets/aliases/etc.
159 return token_scope == token_scope_; 159 return token_scope == token_scope_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return std::string(); 192 return std::string();
193 } 193 }
194 194
195 std::string shared_secret; 195 std::string shared_secret;
196 // Everything is valid, so return the shared secret to the caller. 196 // Everything is valid, so return the shared secret to the caller.
197 dict->GetStringWithoutPathExpansion("access_token", &shared_secret); 197 dict->GetStringWithoutPathExpansion("access_token", &shared_secret);
198 return shared_secret; 198 return shared_secret;
199 } 199 }
200 200
201 } // namespace remoting 201 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/oauth_client.cc ('k') | remoting/host/video_frame_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698