summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 04:49:47 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 04:49:47 +0000
commitc530082e7261d5190b8a2b455773c41f35366dfa (patch)
tree4f86f841f7f4a2c42af8d6cdb02ec3d6334c27f4 /chrome/browser/ui
parent867ba1d0f0235a9330ee4a14760a3295e83b77ef (diff)
downloadchromium_src-c530082e7261d5190b8a2b455773c41f35366dfa.zip
chromium_src-c530082e7261d5190b8a2b455773c41f35366dfa.tar.gz
chromium_src-c530082e7261d5190b8a2b455773c41f35366dfa.tar.bz2
cros: Run sync animation for new users only.
BUG=150679 TEST=Verify sync animation only runs when user logs into device for the first time. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10960017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157926 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/ash/chrome_launcher_prefs.cc3
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc5
2 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
index ba4e097..5769056 100644
--- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc
+++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
@@ -57,6 +57,9 @@ void RegisterChromeLauncherUserPrefs(PrefService* user_prefs) {
user_prefs->RegisterStringPref(prefs::kShelfAlignment,
kShelfAlignmentBottom,
PrefService::SYNCABLE_PREF);
+ user_prefs->RegisterBooleanPref(prefs::kLauncherShouldRunSyncAnimation,
+ true,
+ PrefService::UNSYNCABLE_PREF);
}
base::DictionaryValue* CreateAppDict(const std::string& app_id) {
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 040810c..db97d8b 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -123,7 +123,10 @@ ChromeLauncherController::ChromeLauncherController(Profile* profile,
profile_ = ProfileManager::GetDefaultProfile()->GetOriginalProfile();
// Monitor app sync on chromeos.
- if (!IsLoggedInAsGuest()) {
+ PrefService* prefs = profile_->GetPrefs();
+ if (!IsLoggedInAsGuest() &&
+ prefs->GetBoolean(prefs::kLauncherShouldRunSyncAnimation)) {
+ prefs->SetBoolean(prefs::kLauncherShouldRunSyncAnimation, false);
observed_sync_service_ =
ProfileSyncServiceFactory::GetForProfile(profile_);
if (observed_sync_service_)