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

Unified Diff: chrome/browser/apps/shortcut_manager.cc

Issue 298953002: Remove --disable-app-shims. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't check disableCreateAppShortcut on NTP. Created 6 years, 7 months 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
Index: chrome/browser/apps/shortcut_manager.cc
diff --git a/chrome/browser/apps/shortcut_manager.cc b/chrome/browser/apps/shortcut_manager.cc
index e909e82eb9c3dd149b1569ab95a9f67ac75cbb00..a4749391fde364c3b987e23db9ad2bd7b0de8c36 100644
--- a/chrome/browser/apps/shortcut_manager.cc
+++ b/chrome/browser/apps/shortcut_manager.cc
@@ -27,10 +27,6 @@
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension_set.h"
-#if defined(OS_MACOSX)
-#include "apps/app_shim/app_shim_mac.h"
-#endif
-
using extensions::Extension;
namespace {
@@ -108,11 +104,6 @@ void AppShortcutManager::Observe(int type,
break;
}
case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
-#if defined(OS_MACOSX)
- if (!apps::IsAppShimsEnabled())
- break;
-#endif // defined(OS_MACOSX)
-
const extensions::InstalledExtensionInfo* installed_info =
content::Details<const extensions::InstalledExtensionInfo>(details)
.ptr();
@@ -150,22 +141,11 @@ void AppShortcutManager::OnProfileWillBeRemoved(
}
void AppShortcutManager::OnceOffCreateShortcuts() {
- bool was_enabled = prefs_->GetBoolean(prefs::kAppShortcutsHaveBeenCreated);
-
- // Creation of shortcuts on Mac currently can be disabled with
- // --disable-app-shims, so check the flag, and set the pref accordingly.
-#if defined(OS_MACOSX)
- bool is_now_enabled = apps::IsAppShimsEnabled();
-#else
- bool is_now_enabled = true;
-#endif // defined(OS_MACOSX)
-
- if (was_enabled != is_now_enabled)
- prefs_->SetBoolean(prefs::kAppShortcutsHaveBeenCreated, is_now_enabled);
-
- if (was_enabled || !is_now_enabled)
+ if (prefs_->GetBoolean(prefs::kAppShortcutsHaveBeenCreated))
return;
+ prefs_->SetBoolean(prefs::kAppShortcutsHaveBeenCreated, true);
+
// Check if extension system/service are available. They might not be in
// tests.
extensions::ExtensionSystem* extension_system;

Powered by Google App Engine
This is Rietveld 408576698