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

Side by Side Diff: apps/shortcut_manager.cc

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/memory/ref_counted_delete_on_message_loop.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "apps/shortcut_manager.h" 5 #include "apps/shortcut_manager.h"
6 6
7 #include "apps/pref_names.h" 7 #include "apps/pref_names.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 extensions::ExtensionSystem* extension_system; 136 extensions::ExtensionSystem* extension_system;
137 ExtensionServiceInterface* extension_service; 137 ExtensionServiceInterface* extension_service;
138 if (!(extension_system = extensions::ExtensionSystem::Get(profile_)) || 138 if (!(extension_system = extensions::ExtensionSystem::Get(profile_)) ||
139 !(extension_service = extension_system->extension_service())) 139 !(extension_service = extension_system->extension_service()))
140 return; 140 return;
141 141
142 // Create an applications menu shortcut for each app in this profile. 142 // Create an applications menu shortcut for each app in this profile.
143 const ExtensionSet* apps = extension_service->extensions(); 143 const ExtensionSet* apps = extension_service->extensions();
144 for (ExtensionSet::const_iterator it = apps->begin(); 144 for (ExtensionSet::const_iterator it = apps->begin();
145 it != apps->end(); ++it) { 145 it != apps->end(); ++it) {
146 if (ShouldCreateShortcutFor(*it)) 146 if (ShouldCreateShortcutFor(it->get()))
147 web_app::UpdateShortcutInfoAndIconForApp( 147 web_app::UpdateShortcutInfoAndIconForApp(
148 *(*it), profile_, base::Bind(&CreateShortcutsInApplicationsMenu)); 148 *it->get(), profile_, base::Bind(&CreateShortcutsInApplicationsMenu));
149 } 149 }
150 } 150 }
151 151
152 void ShortcutManager::DeleteApplicationShortcuts( 152 void ShortcutManager::DeleteApplicationShortcuts(
153 const Extension* extension) { 153 const Extension* extension) {
154 ShellIntegration::ShortcutInfo delete_info = 154 ShellIntegration::ShortcutInfo delete_info =
155 web_app::ShortcutInfoForExtensionAndProfile(extension, profile_); 155 web_app::ShortcutInfoForExtensionAndProfile(extension, profile_);
156 web_app::DeleteAllShortcuts(delete_info); 156 web_app::DeleteAllShortcuts(delete_info);
157 } 157 }
158 158
159 } // namespace apps 159 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | base/memory/ref_counted_delete_on_message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698