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

Side by Side Diff: chrome/browser/apps/shortcut_manager.h

Issue 263403002: Replace OnceOffCreateShortcuts with UpdateShortcutsForAllAppsIfNeeded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/apps/shortcut_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ 5 #ifndef CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_
6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ 6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/scoped_observer.h" 9 #include "base/scoped_observer.h"
10 #include "chrome/browser/profiles/profile_info_cache_observer.h" 10 #include "chrome/browser/profiles/profile_info_cache_observer.h"
(...skipping 16 matching lines...) Expand all
27 class AppShortcutManager : public KeyedService, 27 class AppShortcutManager : public KeyedService,
28 public extensions::ExtensionRegistryObserver, 28 public extensions::ExtensionRegistryObserver,
29 public ProfileInfoCacheObserver { 29 public ProfileInfoCacheObserver {
30 public: 30 public:
31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
32 32
33 explicit AppShortcutManager(Profile* profile); 33 explicit AppShortcutManager(Profile* profile);
34 34
35 virtual ~AppShortcutManager(); 35 virtual ~AppShortcutManager();
36 36
37 // Checks if kShortcutsEnabled is set in prefs. If not, this sets it and 37 // Updates all shortcuts if kAppShortcutsVersion in prefs is less than
38 // creates shortcuts for all apps. 38 // kCurrentAppShortcutsVersion.
39 void OnceOffCreateShortcuts(); 39 void UpdateShortcutsForAllAppsIfNeeded();
40 40
41 // extensions::ExtensionRegistryObserver. 41 // extensions::ExtensionRegistryObserver.
42 virtual void OnExtensionWillBeInstalled( 42 virtual void OnExtensionWillBeInstalled(
43 content::BrowserContext* browser_context, 43 content::BrowserContext* browser_context,
44 const extensions::Extension* extension, 44 const extensions::Extension* extension,
45 bool is_update, 45 bool is_update,
46 bool from_ephemeral, 46 bool from_ephemeral,
47 const std::string& old_name) OVERRIDE; 47 const std::string& old_name) OVERRIDE;
48 virtual void OnExtensionUninstalled( 48 virtual void OnExtensionUninstalled(
49 content::BrowserContext* browser_context, 49 content::BrowserContext* browser_context,
(...skipping 13 matching lines...) Expand all
63 ScopedObserver<extensions::ExtensionRegistry, 63 ScopedObserver<extensions::ExtensionRegistry,
64 extensions::ExtensionRegistryObserver> 64 extensions::ExtensionRegistryObserver>
65 extension_registry_observer_; 65 extension_registry_observer_;
66 66
67 base::WeakPtrFactory<AppShortcutManager> weak_ptr_factory_; 67 base::WeakPtrFactory<AppShortcutManager> weak_ptr_factory_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); 69 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager);
70 }; 70 };
71 71
72 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ 72 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/apps/shortcut_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698