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

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

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 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
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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 // BrowserContextKeyedService and use ExtensionRegistryObserver. 1089 // BrowserContextKeyedService and use ExtensionRegistryObserver.
1090 profile_->GetExtensionSpecialStoragePolicy()-> 1090 profile_->GetExtensionSpecialStoragePolicy()->
1091 RevokeRightsForExtension(extension); 1091 RevokeRightsForExtension(extension);
1092 1092
1093 #if defined(OS_CHROMEOS) 1093 #if defined(OS_CHROMEOS)
1094 // Revoke external file access for the extension from its file system context. 1094 // Revoke external file access for the extension from its file system context.
1095 // It is safe to access the extension's storage partition at this point. The 1095 // It is safe to access the extension's storage partition at this point. The
1096 // storage partition may get destroyed only after the extension gets unloaded. 1096 // storage partition may get destroyed only after the extension gets unloaded.
1097 GURL site = 1097 GURL site =
1098 extensions::util::GetSiteForExtensionId(extension->id(), profile_); 1098 extensions::util::GetSiteForExtensionId(extension->id(), profile_);
1099 fileapi::FileSystemContext* filesystem_context = 1099 storage::FileSystemContext* filesystem_context =
1100 BrowserContext::GetStoragePartitionForSite(profile_, site)-> 1100 BrowserContext::GetStoragePartitionForSite(profile_, site)
1101 GetFileSystemContext(); 1101 ->GetFileSystemContext();
1102 if (filesystem_context && filesystem_context->external_backend()) { 1102 if (filesystem_context && filesystem_context->external_backend()) {
1103 filesystem_context->external_backend()-> 1103 filesystem_context->external_backend()->
1104 RevokeAccessForExtension(extension->id()); 1104 RevokeAccessForExtension(extension->id());
1105 } 1105 }
1106 #endif 1106 #endif
1107 1107
1108 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't 1108 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't
1109 // work properly multi-profile. Besides which, it should be using 1109 // work properly multi-profile. Besides which, it should be using
1110 // ExtensionRegistryObserver::OnExtensionLoaded. See http://crbug.com/355029. 1110 // ExtensionRegistryObserver::OnExtensionLoaded. See http://crbug.com/355029.
1111 UpdateActiveExtensionsInCrashReporter(); 1111 UpdateActiveExtensionsInCrashReporter();
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 } 2359 }
2360 2360
2361 void ExtensionService::OnProfileDestructionStarted() { 2361 void ExtensionService::OnProfileDestructionStarted() {
2362 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2362 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2363 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2363 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2364 it != ids_to_unload.end(); 2364 it != ids_to_unload.end();
2365 ++it) { 2365 ++it) {
2366 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2366 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2367 } 2367 }
2368 } 2368 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698