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

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

Issue 612983004: Gather metrics on hosted app unlimitedStorage usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_special_storage_policy.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) 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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 registry_->TriggerOnLoaded(extension); 1001 registry_->TriggerOnLoaded(extension);
1002 1002
1003 content::NotificationService::current()->Notify( 1003 content::NotificationService::current()->Notify(
1004 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 1004 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
1005 content::Source<Profile>(profile_), 1005 content::Source<Profile>(profile_),
1006 content::Details<const Extension>(extension)); 1006 content::Details<const Extension>(extension));
1007 1007
1008 // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a 1008 // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a
1009 // BrowserContextKeyedService and use ExtensionRegistryObserver. 1009 // BrowserContextKeyedService and use ExtensionRegistryObserver.
1010 profile_->GetExtensionSpecialStoragePolicy()-> 1010 profile_->GetExtensionSpecialStoragePolicy()->
1011 GrantRightsForExtension(extension); 1011 GrantRightsForExtension(extension, profile_);
1012 1012
1013 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't 1013 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't
1014 // work properly multi-profile. Besides which, it should be using 1014 // work properly multi-profile. Besides which, it should be using
1015 // ExtensionRegistryObserver. See http://crbug.com/355029. 1015 // ExtensionRegistryObserver. See http://crbug.com/355029.
1016 UpdateActiveExtensionsInCrashReporter(); 1016 UpdateActiveExtensionsInCrashReporter();
1017 1017
1018 const extensions::PermissionsData* permissions_data = 1018 const extensions::PermissionsData* permissions_data =
1019 extension->permissions_data(); 1019 extension->permissions_data();
1020 1020
1021 // If the extension has permission to load chrome://favicon/ resources we need 1021 // If the extension has permission to load chrome://favicon/ resources we need
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 } 2355 }
2356 2356
2357 void ExtensionService::OnProfileDestructionStarted() { 2357 void ExtensionService::OnProfileDestructionStarted() {
2358 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2358 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2359 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2359 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2360 it != ids_to_unload.end(); 2360 it != ids_to_unload.end();
2361 ++it) { 2361 ++it) {
2362 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2362 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2363 } 2363 }
2364 } 2364 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_special_storage_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698