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

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

Issue 10694056: CPM Extension Uninstall Watching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Requested changes made 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/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 753 }
754 ExtensionDataDeleter::StartDeleting( 754 ExtensionDataDeleter::StartDeleting(
755 profile_, extension_id, extension->url(), is_storage_isolated); 755 profile_, extension_id, extension->url(), is_storage_isolated);
756 756
757 UntrackTerminatedExtension(extension_id); 757 UntrackTerminatedExtension(extension_id);
758 758
759 // Notify interested parties that we've uninstalled this extension. 759 // Notify interested parties that we've uninstalled this extension.
760 content::NotificationService::current()->Notify( 760 content::NotificationService::current()->Notify(
761 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 761 chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
762 content::Source<Profile>(profile_), 762 content::Source<Profile>(profile_),
763 content::Details<const std::string>(&extension_id)); 763 content::Details<const Extension>(extension));
764 764
765 if (app_sync_bundle_.HasExtensionId(extension_id) && 765 if (app_sync_bundle_.HasExtensionId(extension_id) &&
766 sync_change.sync_data().GetDataType() == syncer::APPS) { 766 sync_change.sync_data().GetDataType() == syncer::APPS) {
767 app_sync_bundle_.ProcessDeletion(extension_id, sync_change); 767 app_sync_bundle_.ProcessDeletion(extension_id, sync_change);
768 } else if (extension_sync_bundle_.HasExtensionId(extension_id) && 768 } else if (extension_sync_bundle_.HasExtensionId(extension_id) &&
769 sync_change.sync_data().GetDataType() == syncer::EXTENSIONS) { 769 sync_change.sync_data().GetDataType() == syncer::EXTENSIONS) {
770 extension_sync_bundle_.ProcessDeletion(extension_id, sync_change); 770 extension_sync_bundle_.ProcessDeletion(extension_id, sync_change);
771 } 771 }
772 772
773 // Track the uninstallation. 773 // Track the uninstallation.
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 2560
2561 // To coexist with certain unit tests that don't have a work-thread message 2561 // To coexist with certain unit tests that don't have a work-thread message
2562 // loop available at ExtensionService shutdown, we lazy-initialize this 2562 // loop available at ExtensionService shutdown, we lazy-initialize this
2563 // object so that those cases neither create nor destroy an 2563 // object so that those cases neither create nor destroy an
2564 // APIResourceController. 2564 // APIResourceController.
2565 if (!api_resource_controller_.get()) { 2565 if (!api_resource_controller_.get()) {
2566 api_resource_controller_.reset(new extensions::APIResourceController()); 2566 api_resource_controller_.reset(new extensions::APIResourceController());
2567 } 2567 }
2568 return api_resource_controller_.get(); 2568 return api_resource_controller_.get();
2569 } 2569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698