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

Side by Side Diff: chrome/browser/extensions/app_shortcut_manager.cc

Issue 10694056: CPM Extension Uninstall Watching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 5 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
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 "chrome/browser/extensions/app_shortcut_manager.h" 5 #include "chrome/browser/extensions/app_shortcut_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/web_applications/web_app.h" 10 #include "chrome/browser/web_applications/web_app.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const Extension* extension = content::Details<const Extension>( 69 const Extension* extension = content::Details<const Extension>(
70 details).ptr(); 70 details).ptr();
71 if (!disable_shortcut_creation_for_tests && 71 if (!disable_shortcut_creation_for_tests &&
72 extension->is_platform_app() && 72 extension->is_platform_app() &&
73 extension->location() != Extension::LOAD) { 73 extension->location() != Extension::LOAD) {
74 InstallApplicationShortcuts(extension); 74 InstallApplicationShortcuts(extension);
75 } 75 }
76 break; 76 break;
77 } 77 }
78 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { 78 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {
79 std::string extension_id = *content::Details<std::string>(details).ptr(); 79 std::string extension_id =
80 content::Details<const Extension>(details).ptr()->id();
80 if (!disable_shortcut_creation_for_tests) 81 if (!disable_shortcut_creation_for_tests)
81 web_app::DeleteAllShortcuts(profile_->GetPath(), extension_id); 82 web_app::DeleteAllShortcuts(profile_->GetPath(), extension_id);
82 break; 83 break;
83 } 84 }
84 default: 85 default:
85 NOTREACHED(); 86 NOTREACHED();
86 } 87 }
87 #endif 88 #endif
88 } 89 }
89 90
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 132 }
132 info_list.push_back( 133 info_list.push_back(
133 ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size))); 134 ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size)));
134 } 135 }
135 136
136 // |icon_resources| may still be empty at this point, in which case LoadImage 137 // |icon_resources| may still be empty at this point, in which case LoadImage
137 // will call the OnImageLoaded callback with an empty image and exit 138 // will call the OnImageLoaded callback with an empty image and exit
138 // immediately. 139 // immediately.
139 tracker_.LoadImages(extension, info_list, ImageLoadingTracker::DONT_CACHE); 140 tracker_.LoadImages(extension, info_list, ImageLoadingTracker::DONT_CACHE);
140 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notification_manager_unittest.cc ('k') | chrome/browser/extensions/extension_management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698