forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move cookie logic out of reconcilor/signin manager and into a new PKS.
This is necessary for the Cross-Device promo which needs to work with the GAIA cookies. Note: The Reconcilor will still call ExternalCCConnections on every reconcile; teasing apart the reconcilor's flow will wait until /ListAccounts is refactored and the GCMS has indepdent calling of ExternalCCConnections. Still to do, in future CLs: - Make the GaiaCookieManagerService independently check for freshness of ExternalCCConnections before executing any MergeSession (every 3 hours?) - Move all /ListAccounts calls into the GaiaCookieManagerService, and have it publish to all observers when that fails/succeeds - Move all logic that listens to cookie changes into GCMS, publish a notification when change happens - Rename the MergeSessionComplete method of the signin_tracker - Add retry (and backoff) logic for AddAccount calls - Remove CrOS's direct calls to gaia_auth_fetcher->StartMergeSession BUG=463611, 466799 TBR=zea@chromium.org Review URL: https://codereview.chromium.org/1015533002 Cr-Commit-Position: refs/heads/master@{#322774}
- Loading branch information
mlerman
authored and
Commit bot
committed
Mar 30, 2015
1 parent
0b3f0e2
commit 2bccc6a
Showing
34 changed files
with
532 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
chrome/browser/signin/gaia_cookie_manager_service_factory.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" | ||
|
||
#include "chrome/browser/profiles/profile.h" | ||
#include "chrome/browser/signin/chrome_signin_client_factory.h" | ||
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | ||
#include "components/keyed_service/content/browser_context_dependency_manager.h" | ||
#include "components/signin/core/browser/gaia_cookie_manager_service.h" | ||
#include "components/signin/core/browser/profile_oauth2_token_service.h" | ||
#include "google_apis/gaia/gaia_constants.h" | ||
|
||
GaiaCookieManagerServiceFactory::GaiaCookieManagerServiceFactory() | ||
: BrowserContextKeyedServiceFactory( | ||
"GaiaCookieManagerService", | ||
BrowserContextDependencyManager::GetInstance()) { | ||
DependsOn(ChromeSigninClientFactory::GetInstance()); | ||
DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | ||
} | ||
|
||
GaiaCookieManagerServiceFactory::~GaiaCookieManagerServiceFactory() {} | ||
|
||
// static | ||
GaiaCookieManagerService* GaiaCookieManagerServiceFactory::GetForProfile( | ||
Profile* profile) { | ||
return static_cast<GaiaCookieManagerService*>( | ||
GetInstance()->GetServiceForBrowserContext(profile, true)); | ||
} | ||
|
||
// static | ||
GaiaCookieManagerServiceFactory* | ||
GaiaCookieManagerServiceFactory::GetInstance() { | ||
return Singleton<GaiaCookieManagerServiceFactory>::get(); | ||
} | ||
|
||
KeyedService* GaiaCookieManagerServiceFactory::BuildServiceInstanceFor( | ||
content::BrowserContext* context) const { | ||
Profile* profile = Profile::FromBrowserContext(context); | ||
GaiaCookieManagerService* cookie_service = new GaiaCookieManagerService( | ||
ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | ||
GaiaConstants::kChromeSource, | ||
ChromeSigninClientFactory::GetForProfile(profile)); | ||
return cookie_service; | ||
} | ||
|
||
void GaiaCookieManagerServiceFactory::RegisterProfilePrefs( | ||
user_prefs::PrefRegistrySyncable* registry) { | ||
} |
Oops, something went wrong.