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

Unified Diff: apps/shortcut_manager.h

Issue 17261016: When app shortcuts are enabled, do a once-off creation of all shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Fix tests. Created 7 years, 6 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
« no previous file with comments | « apps/prefs.cc ('k') | apps/shortcut_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shortcut_manager.h
diff --git a/apps/shortcut_manager.h b/apps/shortcut_manager.h
index a0efb822c183728afce6f717285a99238dccfffa..b654053c778e8db73f179e67ae904b9a491070b7 100644
--- a/apps/shortcut_manager.h
+++ b/apps/shortcut_manager.h
@@ -11,6 +11,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+class PrefService;
class Profile;
namespace apps {
@@ -29,10 +30,15 @@ class ShortcutManager : public BrowserContextKeyedService,
const content::NotificationDetails& details) OVERRIDE;
private:
+ // Checks if kShortcutsEnabled is set in prefs. If not, this sets it and
+ // creates shortcuts for all apps.
+ void OnceOffCreateShortcuts();
+
void DeleteApplicationShortcuts(const extensions::Extension* extension);
content::NotificationRegistrar registrar_;
Profile* profile_;
+ PrefService* prefs_;
// Fields used when installing application shortcuts.
base::WeakPtrFactory<ShortcutManager> weak_factory_;
« no previous file with comments | « apps/prefs.cc ('k') | apps/shortcut_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698