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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 23767004: Revert "Handling of multiple concurrent requests from different clients in OAuth2TokenService" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync/test_profile_sync_service.h" 5 #include "chrome/browser/sync/test_profile_sync_service.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/signin/signin_manager.h" 8 #include "chrome/browser/signin/signin_manager.h"
9 #include "chrome/browser/signin/signin_manager_factory.h" 9 #include "chrome/browser/signin/signin_manager_factory.h"
10 #include "chrome/browser/sync/glue/data_type_controller.h" 10 #include "chrome/browser/sync/glue/data_type_controller.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 synchronous_backend_initialization_, 312 synchronous_backend_initialization_,
313 fail_initial_download_, 313 fail_initial_download_,
314 storage_option_)); 314 storage_option_));
315 } 315 }
316 316
317 scoped_ptr<OAuth2TokenService::Request> FakeOAuth2TokenService::StartRequest( 317 scoped_ptr<OAuth2TokenService::Request> FakeOAuth2TokenService::StartRequest(
318 const OAuth2TokenService::ScopeSet& scopes, 318 const OAuth2TokenService::ScopeSet& scopes,
319 OAuth2TokenService::Consumer* consumer) { 319 OAuth2TokenService::Consumer* consumer) {
320 // Ensure token in question is cached and never expires. Request will succeed 320 // Ensure token in question is cached and never expires. Request will succeed
321 // without network IO. 321 // without network IO.
322 RegisterCacheEntry("test_client_id", 322 RegisterCacheEntry(GetRefreshToken(), scopes, "access_token",
323 GetRefreshToken(), 323 base::Time::Max());
324 scopes,
325 "access_token",
326 base::Time::Max());
327 return ProfileOAuth2TokenService::StartRequest(scopes, consumer); 324 return ProfileOAuth2TokenService::StartRequest(scopes, consumer);
328 } 325 }
329 326
330 BrowserContextKeyedService* FakeOAuth2TokenService::BuildTokenService( 327 BrowserContextKeyedService* FakeOAuth2TokenService::BuildTokenService(
331 content::BrowserContext* context) { 328 content::BrowserContext* context) {
332 Profile* profile = static_cast<Profile*>(context); 329 Profile* profile = static_cast<Profile*>(context);
333 330
334 FakeOAuth2TokenService* service = new FakeOAuth2TokenService(); 331 FakeOAuth2TokenService* service = new FakeOAuth2TokenService();
335 service->Initialize(profile); 332 service->Initialize(profile);
336 return service; 333 return service;
337 } 334 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/profile_oauth2_token_service_unittest.cc ('k') | google_apis/gaia/oauth2_access_token_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698