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

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

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: works for all platforms commit e75a498951318d4deb65d40ce8b2def44cd5abc0 Created 5 years, 5 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/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 DCHECK(!access_token_.empty()); 307 DCHECK(!access_token_.empty());
308 DCHECK(!account_id_.empty()); 308 DCHECK(!account_id_.empty());
309 DCHECK(!scopes.empty()); 309 DCHECK(!scopes.empty());
310 } 310 }
311 311
312 InvalidateCore::~InvalidateCore() { 312 InvalidateCore::~InvalidateCore() {
313 } 313 }
314 314
315 void InvalidateCore::StartOnTokenServiceThread() { 315 void InvalidateCore::StartOnTokenServiceThread() {
316 DCHECK(token_service_task_runner()->BelongsToCurrentThread()); 316 DCHECK(token_service_task_runner()->BelongsToCurrentThread());
317 token_service()->InvalidateToken(account_id_, scopes_, access_token_); 317 token_service()->InvalidateAccessToken(account_id_, scopes_, access_token_);
318 } 318 }
319 319
320 void InvalidateCore::StopOnTokenServiceThread() { 320 void InvalidateCore::StopOnTokenServiceThread() {
321 DCHECK(token_service_task_runner()->BelongsToCurrentThread()); 321 DCHECK(token_service_task_runner()->BelongsToCurrentThread());
322 // Nothing to do. 322 // Nothing to do.
323 } 323 }
324 324
325 } // namespace 325 } // namespace
326 326
327 // static 327 // static
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 const std::string& account_id) 363 const std::string& account_id)
364 : account_id_(account_id) { 364 : account_id_(account_id) {
365 DCHECK(!account_id_.empty()); 365 DCHECK(!account_id_.empty());
366 } 366 }
367 367
368 void OAuth2TokenServiceRequest::StartWithCore(const scoped_refptr<Core>& core) { 368 void OAuth2TokenServiceRequest::StartWithCore(const scoped_refptr<Core>& core) {
369 DCHECK(core.get()); 369 DCHECK(core.get());
370 core_ = core; 370 core_ = core;
371 core_->Start(); 371 core_->Start();
372 } 372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698