Commit 56d3c6e4 authored by tapted@chromium.org's avatar tapted@chromium.org

Add enable-app-launcher-shim to chrome://flags.

Adds a flag for --enable-app-launcher-shim to chrome://flags. Enable to 
ensure an OSX app bundle for the App Launcher exists under the 
Applications folder. If the flag is not present any previously created 
app bundle for the App Launcher will be deleted on startup. 

BUG=138633
TEST=Tested enabling and disabling the flag in chrome://flags.

Review URL: https://chromiumcodereview.appspot.com/15675008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202838 0039d316-1c4b-4281-b951-d872f2087c98
parent 56eee1d4
......@@ -7206,6 +7206,14 @@ Keep your key file in a safe place. You will need it to create new versions of y
Make the menu button touch-draggable so that users can execute a menu item (e.g., New Tab, Settings,...) by a single touch.
If the popup list is too long to display at once, touch-dragging at the top or the bottom scrolls the list.
</message>
<if expr="is_macosx">
<message name="IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME" desc="Name of the flag to enable the app launcher app bundle.">
Enable App Launcher OSX app bundle.
</message>
<message name="IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION" desc="Description of the flag to enable the app launcher app bundle.">
Enable to ensure an OSX app bundle for the App Launcher exists under the Applications folder.
</message>
</if>
<!-- Crashes -->
<message name="IDS_CRASHES_TITLE" desc="Title for the chrome://crashes page.">
......
......@@ -1463,6 +1463,15 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
},
#if defined(OS_MACOSX)
{
"enable-app-list-shim",
IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
kOsMac,
SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
},
#endif
};
const Experiment* experiments = kExperiments;
......
......@@ -140,8 +140,8 @@ void CreateAppListShim(const base::FilePath& profile_path) {
// If disabling with --enable-app-list-shim=0, and there is one, delete it.
void CheckAppListShimOnFileThread(const base::FilePath& profile_path) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
const bool enable = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kEnableAppListShim).c_str()[0] != '0';
const bool enable =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppListShim);
base::FilePath install_path = web_app::GetAppInstallPath(
GetAppListShortcutInfo(profile_path));
if (enable == file_util::PathExists(install_path))
......@@ -214,8 +214,7 @@ void AppListServiceMac::Init(Profile* initial_profile) {
// a profile has not yet been determined so |initial_profile| will be NULL.
if (initial_profile) {
static bool checked_shim = false;
if (!checked_shim && CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableAppListShim)) {
if (!checked_shim) {
checked_shim = true;
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,
......
......@@ -1519,11 +1519,10 @@ const char kPasswordStore[] = "password-store";
#endif // OS_POSIX
#if defined(OS_MACOSX)
// Enables the app list OSX .app shim, for showing the app list. Takes an
// optional argument: --enable-app-list-shim=0 will delete a previously created
// .app folder for the app list shim. Any other argument, or no argument, will
// create it.
extern const char kEnableAppListShim[] = "enable-app-list-shim";
// Enables the app list OSX .app shim, for showing the app list. If the flag is
// not present, Chrome will check if the shim exists at startup, and delete it
// if it does.
const char kEnableAppListShim[] = "enable-app-list-shim";
// Enables the tabs expose feature ( http://crbug.com/50307 ).
const char kEnableExposeForTabs[] = "enable-expose-for-tabs";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment