| Index: chrome/browser/extensions/default_apps.cc
|
| diff --git a/chrome/browser/extensions/default_apps.cc b/chrome/browser/extensions/default_apps.cc
|
| index 31762906b121cdb5b6cc70d9f204879bd31ced62..a37fadc4a256af80666fd0d1c7226963169355fb 100644
|
| --- a/chrome/browser/extensions/default_apps.cc
|
| +++ b/chrome/browser/extensions/default_apps.cc
|
| @@ -19,6 +19,8 @@
|
|
|
| namespace default_apps {
|
|
|
| +bool isMigration;
|
| +
|
| bool ShouldInstallInProfile(Profile* profile) {
|
| // We decide to install or not install default apps based on the following
|
| // criteria, from highest priority to lowest priority:
|
| @@ -33,12 +35,14 @@ bool ShouldInstallInProfile(Profile* profile) {
|
| bool install_apps =
|
| profile->GetPrefs()->GetString(prefs::kDefaultApps) == "install";
|
|
|
| - default_apps::InstallState state =
|
| - static_cast<default_apps::InstallState>(profile->GetPrefs()->GetInteger(
|
| + InstallState state =
|
| + static_cast<InstallState>(profile->GetPrefs()->GetInteger(
|
| prefs::kDefaultAppsInstallState));
|
|
|
| + isMigration = (state == kProvideLegacyDefaultApps);
|
| +
|
| switch (state) {
|
| - case default_apps::kUnknown: {
|
| + case kUnknown: {
|
| // This is the first time the default apps feature runs on this profile.
|
| // Determine if we want to install them or not.
|
| chrome::VersionInfo version_info;
|
| @@ -52,14 +56,14 @@ bool ShouldInstallInProfile(Profile* profile) {
|
| // apps affected all users. Migrate old default apps to new mechanism where
|
| // they are installed only once as INTERNAL.
|
| // TODO(grv) : remove after Q1-2013.
|
| - case default_apps::kProvideLegacyDefaultApps:
|
| + case kProvideLegacyDefaultApps:
|
| profile->GetPrefs()->SetInteger(
|
| prefs::kDefaultAppsInstallState,
|
| - default_apps::kAlreadyInstalledDefaultApps);
|
| + kAlreadyInstalledDefaultApps);
|
| break;
|
|
|
| - case default_apps::kAlreadyInstalledDefaultApps:
|
| - case default_apps::kNeverInstallDefaultApps:
|
| + case kAlreadyInstalledDefaultApps:
|
| + case kNeverInstallDefaultApps:
|
| install_apps = false;
|
| break;
|
| default:
|
| @@ -82,14 +86,14 @@ bool ShouldInstallInProfile(Profile* profile) {
|
|
|
| // Default apps are only installed on profile creation or a new chrome
|
| // download.
|
| - if (state == default_apps::kUnknown) {
|
| + if (state == kUnknown) {
|
| if (install_apps) {
|
| profile->GetPrefs()->SetInteger(
|
| prefs::kDefaultAppsInstallState,
|
| - default_apps::kAlreadyInstalledDefaultApps);
|
| + kAlreadyInstalledDefaultApps);
|
| } else {
|
| profile->GetPrefs()->SetInteger(prefs::kDefaultAppsInstallState,
|
| - default_apps::kNeverInstallDefaultApps);
|
| + kNeverInstallDefaultApps);
|
| }
|
| }
|
|
|
|
|