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

Side by Side Diff: remoting/host/oauth_token_getter.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/client_session.cc ('k') | remoting/host/setup/me2me_native_messaging_host.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/oauth_token_getter.h" 5 #include "remoting/host/oauth_token_getter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "google_apis/google_api_keys.h" 10 #include "google_apis/google_api_keys.h"
(...skipping 20 matching lines...) Expand all
31 refresh_token(refresh_token), 31 refresh_token(refresh_token),
32 is_service_account(is_service_account) { 32 is_service_account(is_service_account) {
33 } 33 }
34 34
35 OAuthTokenGetter::OAuthTokenGetter( 35 OAuthTokenGetter::OAuthTokenGetter(
36 scoped_ptr<OAuthCredentials> oauth_credentials, 36 scoped_ptr<OAuthCredentials> oauth_credentials,
37 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, 37 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter,
38 bool auto_refresh) 38 bool auto_refresh)
39 : oauth_credentials_(oauth_credentials.Pass()), 39 : oauth_credentials_(oauth_credentials.Pass()),
40 gaia_oauth_client_( 40 gaia_oauth_client_(
41 new gaia::GaiaOAuthClient(url_request_context_getter)), 41 new gaia::GaiaOAuthClient(url_request_context_getter.get())),
42 url_request_context_getter_(url_request_context_getter), 42 url_request_context_getter_(url_request_context_getter),
43 refreshing_oauth_token_(false) { 43 refreshing_oauth_token_(false) {
44 if (auto_refresh) { 44 if (auto_refresh) {
45 refresh_timer_.reset(new base::OneShotTimer<OAuthTokenGetter>()); 45 refresh_timer_.reset(new base::OneShotTimer<OAuthTokenGetter>());
46 } 46 }
47 } 47 }
48 48
49 OAuthTokenGetter::~OAuthTokenGetter() {} 49 OAuthTokenGetter::~OAuthTokenGetter() {}
50 50
51 void OAuthTokenGetter::OnGetTokensResponse(const std::string& user_email, 51 void OAuthTokenGetter::OnGetTokensResponse(const std::string& user_email,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 }; 171 };
172 172
173 refreshing_oauth_token_ = true; 173 refreshing_oauth_token_ = true;
174 std::vector<std::string> empty_scope_list; // Use scope from refresh token. 174 std::vector<std::string> empty_scope_list; // Use scope from refresh token.
175 gaia_oauth_client_->RefreshToken( 175 gaia_oauth_client_->RefreshToken(
176 client_info, oauth_credentials_->refresh_token, empty_scope_list, 176 client_info, oauth_credentials_->refresh_token, empty_scope_list,
177 kMaxRetries, this); 177 kMaxRetries, this);
178 } 178 }
179 179
180 } // namespace remoting 180 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698