diff options
author | matthewyuan <matthewyuan@chromium.org> | 2014-11-08 14:37:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-08 22:37:56 +0000 |
commit | 74879efc7b4655dd1def63c53a5f73b46fb511d6 (patch) | |
tree | 77a7dd2e5d9f14fb1490d3876028bcf807b26864 /components/gcm_driver | |
parent | bca70e90f5c0de7b071d277e0d7886e1e0823572 (diff) | |
download | chromium_src-74879efc7b4655dd1def63c53a5f73b46fb511d6.zip chromium_src-74879efc7b4655dd1def63c53a5f73b46fb511d6.tar.gz chromium_src-74879efc7b4655dd1def63c53a5f73b46fb511d6.tar.bz2 |
Revert of [GCM] Fetching OAuth2 tokens periodically in account tracker (patchset #7 id:140001 of https://codereview.chromium.org/631343002/)
Reason for revert:
Reverting since it's causing a crash on canary.
Original issue's description:
> [GCM] Fetching OAuth2 tokens periodically in account tracker
>
> BUG=374969
> R=zea@chromium.org
>
> Committed: https://crrev.com/ede4117a85d34a1c117169d538b297020e69de87
> Cr-Commit-Position: refs/heads/master@{#303340}
TBR=zea@chromium.org,fgorski@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=374969
Review URL: https://codereview.chromium.org/710903002
Cr-Commit-Position: refs/heads/master@{#303397}
Diffstat (limited to 'components/gcm_driver')
-rw-r--r-- | components/gcm_driver/gcm_client_impl.cc | 7 | ||||
-rw-r--r-- | components/gcm_driver/gcm_client_impl.h | 3 | ||||
-rw-r--r-- | components/gcm_driver/gcm_driver_desktop.cc | 7 |
3 files changed, 2 insertions, 15 deletions
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc index 4a68dc0..8fe3df7 100644 --- a/components/gcm_driver/gcm_client_impl.cc +++ b/components/gcm_driver/gcm_client_impl.cc @@ -474,7 +474,7 @@ void GCMClientImpl::RemoveAccountMapping(const std::string& account_id) { void GCMClientImpl::SetLastTokenFetchTime(const base::Time& time) { gcm_store_->SetLastTokenFetchTime( time, - base::Bind(&GCMClientImpl::IgnoreWriteResultCallback, + base::Bind(&GCMClientImpl::DefaultStoreCallback, weak_ptr_factory_.GetWeakPtr())); } @@ -597,11 +597,6 @@ void GCMClientImpl::DefaultStoreCallback(bool success) { DCHECK(success); } -void GCMClientImpl::IgnoreWriteResultCallback(bool success) { - // TODO(fgorski): Ignoring the write result for now to make sure - // sync_intergration_tests are not broken. -} - void GCMClientImpl::Stop() { DVLOG(1) << "Stopping the GCM Client"; weak_ptr_factory_.InvalidateWeakPtrs(); diff --git a/components/gcm_driver/gcm_client_impl.h b/components/gcm_driver/gcm_client_impl.h index c27bb7b..b6a1ab5 100644 --- a/components/gcm_driver/gcm_client_impl.h +++ b/components/gcm_driver/gcm_client_impl.h @@ -230,9 +230,6 @@ class GCMClientImpl // |gcm_store_| fails. void DefaultStoreCallback(bool success); - // Callback for store operation where result does not matter. - void IgnoreWriteResultCallback(bool success); - // Completes the registration request. void OnRegisterCompleted(const std::string& app_id, const std::vector<std::string>& sender_ids, diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc index 352007a..6902efb 100644 --- a/components/gcm_driver/gcm_driver_desktop.cc +++ b/components/gcm_driver/gcm_driver_desktop.cc @@ -363,10 +363,6 @@ GCMDriverDesktop::GCMDriverDesktop( gcm_enabled_(true), connected_(false), account_mapper_(new GCMAccountMapper(this)), - // Setting to max, to make sure it does not prompt for token reporting - // Before reading a reasonable value from the DB, which might be never, - // in which case the fetching will be triggered. - last_token_fetch_time_(base::Time::Max()), ui_thread_(ui_thread), io_thread_(io_thread), weak_ptr_factory_(this) { @@ -776,10 +772,9 @@ void GCMDriverDesktop::GCMClientReady( const base::Time& last_token_fetch_time) { DCHECK(ui_thread_->RunsTasksOnCurrentThread()); - last_token_fetch_time_ = last_token_fetch_time; - GCMDriver::AddAppHandler(kGCMAccountMapperAppId, account_mapper_.get()); account_mapper_->Initialize(account_mappings); + last_token_fetch_time_ = last_token_fetch_time; delayed_task_controller_->SetReady(); } |