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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 8511064: GAIA Profile info prototype (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.cc ('k') | chrome/browser/sync/signin_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index e6a2cef071c94b85cac1d02346af4d41e81adbc1..995d83a94fb8457748ce604f527693d53a0c9f6d 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -61,6 +61,7 @@
#include "grit/generated_resources.h"
#include "net/base/cookie_monster.h"
#include "ui/base/l10n/l10n_util.h"
+#include "chrome/browser/profiles/profile_impl.h"
using browser_sync::ChangeProcessor;
using browser_sync::DataTypeController;
@@ -347,6 +348,7 @@ void ProfileSyncService::OnSyncConfigureDone(
}
void ProfileSyncService::StartUp() {
+ fprintf(stderr, "%s\n", __func__);
// Don't start up multiple times.
if (backend_.get()) {
VLOG(1) << "Skipping bringing up backend host.";
@@ -469,11 +471,16 @@ bool ProfileSyncService::HasSyncSetupCompleted() const {
void ProfileSyncService::SetSyncSetupCompleted() {
sync_prefs_.SetSyncSetupCompleted();
+ if (profile()) {
+ ProfileImpl* profile_impl = static_cast<ProfileImpl*>(profile());
+ profile_impl->UpdateGAIAProfileInfo();
+ }
}
void ProfileSyncService::UpdateLastSyncedTime() {
last_synced_time_ = base::Time::Now();
sync_prefs_.SetLastSyncedTime(last_synced_time_);
+ fprintf(stderr, "%s\n", __func__);
}
void ProfileSyncService::NotifyObservers() {
@@ -613,6 +620,12 @@ void ProfileSyncService::OnSyncCycleCompleted() {
}
VLOG(2) << "Notifying observers sync cycle completed";
NotifyObservers();
+
+ fprintf(stderr, "%s - updating gaia profile info\n", __func__);
+ if (profile()) {
+ ProfileImpl* profile_impl = static_cast<ProfileImpl*>(profile());
+ profile_impl->UpdateGAIAProfileInfo();
+ }
}
// TODO(sync): eventually support removing datatypes too.
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.cc ('k') | chrome/browser/sync/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698