summaryrefslogtreecommitdiffstats
path: root/chrome
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
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')
-rw-r--r--chrome/browser/ui/ash/chrome_launcher_prefs.cc3
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc5
-rw-r--r--chrome/common/pref_names.cc7
-rw-r--r--chrome/common/pref_names.h2
4 files changed, 16 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_)
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 51d6c1e..62f3a03 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1994,6 +1994,13 @@ const char kUseDefaultPinnedApps[] = "use_default_pinned_apps";
const char kPinnedLauncherApps[] =
"pinned_launcher_apps";
+// Boolean value indicating whether launcher should run sync animation.
+// Note this is an unsyncable pref value used as a flag per profile because sync
+// animation should only run once for new ChromeOS login (i.e. once per created
+// profile on ChromeOS device).
+const char kLauncherShouldRunSyncAnimation[] =
+ "launcher_should_run_sync_animation";
+
const char kLongPressTimeInSeconds[] =
"gesture.long_press_time_in_seconds";
const char kMaxDistanceBetweenTapsForDoubleTap[] =
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 1342251..02bdd15 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -722,6 +722,8 @@ extern const char kShelfAutoHideBehavior[];
extern const char kUseDefaultPinnedApps[];
extern const char kPinnedLauncherApps[];
+extern const char kLauncherShouldRunSyncAnimation[];
+
extern const char kLongPressTimeInSeconds[];
extern const char kMaxDistanceBetweenTapsForDoubleTap[];
extern const char kMaxDistanceForTwoFingerTapInPixels[];