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

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

Issue 298883006: Rename NOTIFICATION_EXTENSION_INSTALLED to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 6 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #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 <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 const extensions::Extension* existing_extension = 1932 const extensions::Extension* existing_extension =
1933 GetInstalledExtension(extension->id()); 1933 GetInstalledExtension(extension->id());
1934 bool is_update = false; 1934 bool is_update = false;
1935 std::string old_name; 1935 std::string old_name;
1936 if (existing_extension) { 1936 if (existing_extension) {
1937 is_update = true; 1937 is_update = true;
1938 old_name = existing_extension->name(); 1938 old_name = existing_extension->name();
1939 } 1939 }
1940 extensions::InstalledExtensionInfo details(extension, is_update, old_name); 1940 extensions::InstalledExtensionInfo details(extension, is_update, old_name);
1941 content::NotificationService::current()->Notify( 1941 content::NotificationService::current()->Notify(
1942 chrome::NOTIFICATION_EXTENSION_INSTALLED, 1942 chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
1943 content::Source<Profile>(profile_), 1943 content::Source<Profile>(profile_),
1944 content::Details<const extensions::InstalledExtensionInfo>(&details)); 1944 content::Details<const extensions::InstalledExtensionInfo>(&details));
1945 1945
1946 ExtensionRegistry::Get(profile_) 1946 ExtensionRegistry::Get(profile_)
1947 ->TriggerOnWillBeInstalled(extension, is_update, old_name); 1947 ->TriggerOnWillBeInstalled(extension, is_update, old_name);
1948 1948
1949 bool unacknowledged_external = IsUnacknowledgedExternalExtension(extension); 1949 bool unacknowledged_external = IsUnacknowledgedExternalExtension(extension);
1950 1950
1951 // Unpacked extensions default to allowing file access, but if that has been 1951 // Unpacked extensions default to allowing file access, but if that has been
1952 // overridden, don't reset the value. 1952 // overridden, don't reset the value.
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 } 2450 }
2451 2451
2452 void ExtensionService::OnProfileDestructionStarted() { 2452 void ExtensionService::OnProfileDestructionStarted() {
2453 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2453 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2454 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2454 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2455 it != ids_to_unload.end(); 2455 it != ids_to_unload.end();
2456 ++it) { 2456 ++it) {
2457 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2457 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2458 } 2458 }
2459 } 2459 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_notification_observer.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698