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

Side by Side Diff: google_apis/gaia/oauth2_token_service_request.cc

Issue 625293003: replace OVERRIDE and FINAL with override and final in google_apis/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase on master Created 6 years, 2 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
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 "google_apis/gaia/oauth2_token_service_request.h" 5 #include "google_apis/gaia/oauth2_token_service_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 RequestCore(OAuth2TokenServiceRequest* owner, 158 RequestCore(OAuth2TokenServiceRequest* owner,
159 const scoped_refptr< 159 const scoped_refptr<
160 OAuth2TokenServiceRequest::TokenServiceProvider>& provider, 160 OAuth2TokenServiceRequest::TokenServiceProvider>& provider,
161 OAuth2TokenService::Consumer* consumer, 161 OAuth2TokenService::Consumer* consumer,
162 const std::string& account_id, 162 const std::string& account_id,
163 const OAuth2TokenService::ScopeSet& scopes); 163 const OAuth2TokenService::ScopeSet& scopes);
164 164
165 // OAuth2TokenService::Consumer. Must be called on the token service thread. 165 // OAuth2TokenService::Consumer. Must be called on the token service thread.
166 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 166 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
167 const std::string& access_token, 167 const std::string& access_token,
168 const base::Time& expiration_time) OVERRIDE; 168 const base::Time& expiration_time) override;
169 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, 169 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
170 const GoogleServiceAuthError& error) OVERRIDE; 170 const GoogleServiceAuthError& error) override;
171 171
172 private: 172 private:
173 friend class base::RefCountedThreadSafe<RequestCore>; 173 friend class base::RefCountedThreadSafe<RequestCore>;
174 174
175 // Must be destroyed on the owner thread. 175 // Must be destroyed on the owner thread.
176 virtual ~RequestCore(); 176 virtual ~RequestCore();
177 177
178 // Core implementation. 178 // Core implementation.
179 virtual void StartOnTokenServiceThread() OVERRIDE; 179 virtual void StartOnTokenServiceThread() override;
180 virtual void StopOnTokenServiceThread() OVERRIDE; 180 virtual void StopOnTokenServiceThread() override;
181 181
182 void InformOwnerOnGetTokenSuccess(std::string access_token, 182 void InformOwnerOnGetTokenSuccess(std::string access_token,
183 base::Time expiration_time); 183 base::Time expiration_time);
184 void InformOwnerOnGetTokenFailure(GoogleServiceAuthError error); 184 void InformOwnerOnGetTokenFailure(GoogleServiceAuthError error);
185 185
186 scoped_refptr<base::SingleThreadTaskRunner> owner_task_runner_; 186 scoped_refptr<base::SingleThreadTaskRunner> owner_task_runner_;
187 OAuth2TokenService::Consumer* const consumer_; 187 OAuth2TokenService::Consumer* const consumer_;
188 std::string account_id_; 188 std::string account_id_;
189 OAuth2TokenService::ScopeSet scopes_; 189 OAuth2TokenService::ScopeSet scopes_;
190 190
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 const std::string& account_id, 275 const std::string& account_id,
276 const OAuth2TokenService::ScopeSet& scopes); 276 const OAuth2TokenService::ScopeSet& scopes);
277 277
278 private: 278 private:
279 friend class base::RefCountedThreadSafe<InvalidateCore>; 279 friend class base::RefCountedThreadSafe<InvalidateCore>;
280 280
281 // Must be destroyed on the owner thread. 281 // Must be destroyed on the owner thread.
282 virtual ~InvalidateCore(); 282 virtual ~InvalidateCore();
283 283
284 // Core implementation. 284 // Core implementation.
285 virtual void StartOnTokenServiceThread() OVERRIDE; 285 virtual void StartOnTokenServiceThread() override;
286 virtual void StopOnTokenServiceThread() OVERRIDE; 286 virtual void StopOnTokenServiceThread() override;
287 287
288 std::string access_token_; 288 std::string access_token_;
289 std::string account_id_; 289 std::string account_id_;
290 OAuth2TokenService::ScopeSet scopes_; 290 OAuth2TokenService::ScopeSet scopes_;
291 291
292 DISALLOW_COPY_AND_ASSIGN(InvalidateCore); 292 DISALLOW_COPY_AND_ASSIGN(InvalidateCore);
293 }; 293 };
294 294
295 InvalidateCore::InvalidateCore( 295 InvalidateCore::InvalidateCore(
296 OAuth2TokenServiceRequest* owner, 296 OAuth2TokenServiceRequest* owner,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 const std::string& account_id) 362 const std::string& account_id)
363 : account_id_(account_id) { 363 : account_id_(account_id) {
364 DCHECK(!account_id_.empty()); 364 DCHECK(!account_id_.empty());
365 } 365 }
366 366
367 void OAuth2TokenServiceRequest::StartWithCore(const scoped_refptr<Core>& core) { 367 void OAuth2TokenServiceRequest::StartWithCore(const scoped_refptr<Core>& core) {
368 DCHECK(core.get()); 368 DCHECK(core.get());
369 core_ = core; 369 core_ = core;
370 core_->Start(); 370 core_->Start();
371 } 371 }
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_token_service_request.h ('k') | google_apis/gaia/oauth2_token_service_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698