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

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

Issue 6810037: File API changes needed for safely passing user selected file entities from the file browser comp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "content/common/notification_service.h" 69 #include "content/common/notification_service.h"
70 #include "content/common/notification_type.h" 70 #include "content/common/notification_type.h"
71 #include "googleurl/src/gurl.h" 71 #include "googleurl/src/gurl.h"
72 #include "net/base/registry_controlled_domain.h" 72 #include "net/base/registry_controlled_domain.h"
73 #include "webkit/database/database_tracker.h" 73 #include "webkit/database/database_tracker.h"
74 #include "webkit/database/database_util.h" 74 #include "webkit/database/database_util.h"
75 #include "webkit/plugins/npapi/plugin_list.h" 75 #include "webkit/plugins/npapi/plugin_list.h"
76 76
77 #if defined(OS_CHROMEOS) 77 #if defined(OS_CHROMEOS)
78 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 78 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
79 #include "webkit/fileapi/file_system_context.h"
80 #include "webkit/fileapi/file_system_mount_point_provider.h"
81 #include "webkit/fileapi/file_system_path_manager.h"
79 #endif 82 #endif
80 83
81 using base::Time; 84 using base::Time;
82 85
83 namespace errors = extension_manifest_errors; 86 namespace errors = extension_manifest_errors;
84 87
85 namespace { 88 namespace {
86 89
87 #if defined(OS_LINUX) 90 #if defined(OS_LINUX)
88 static const int kOmniboxIconPaddingLeft = 2; 91 static const int kOmniboxIconPaddingLeft = 2;
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 UnloadedExtensionInfo details(extension, reason); 1080 UnloadedExtensionInfo details(extension, reason);
1078 NotificationService::current()->Notify( 1081 NotificationService::current()->Notify(
1079 NotificationType::EXTENSION_UNLOADED, 1082 NotificationType::EXTENSION_UNLOADED,
1080 Source<Profile>(profile_), 1083 Source<Profile>(profile_),
1081 Details<UnloadedExtensionInfo>(&details)); 1084 Details<UnloadedExtensionInfo>(&details));
1082 1085
1083 if (profile_) { 1086 if (profile_) {
1084 profile_->UnregisterExtensionWithRequestContexts(extension); 1087 profile_->UnregisterExtensionWithRequestContexts(extension);
1085 profile_->GetExtensionSpecialStoragePolicy()-> 1088 profile_->GetExtensionSpecialStoragePolicy()->
1086 RevokeRightsForExtension(extension); 1089 RevokeRightsForExtension(extension);
1090 #if defined(OS_CHROMEOS)
1091 // Revoke external file access to
1092 profile_->GetFileSystemContext()->path_manager()->external_provider()->
1093 RevokeAccessForExtension(extension->id());
1094 #endif
1087 } 1095 }
1088 1096
1089 bool plugins_changed = false; 1097 bool plugins_changed = false;
1090 for (size_t i = 0; i < extension->plugins().size(); ++i) { 1098 for (size_t i = 0; i < extension->plugins().size(); ++i) {
1091 const Extension::PluginInfo& plugin = extension->plugins()[i]; 1099 const Extension::PluginInfo& plugin = extension->plugins()[i];
1092 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 1100 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
1093 NewRunnableFunction(&ForceShutdownPlugin, 1101 NewRunnableFunction(&ForceShutdownPlugin,
1094 plugin.path)); 1102 plugin.path));
1095 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 1103 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
1096 webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath( 1104 webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 } 1933 }
1926 1934
1927 void ExtensionService::SetBeingUpgraded(const Extension* extension, 1935 void ExtensionService::SetBeingUpgraded(const Extension* extension,
1928 bool value) { 1936 bool value) {
1929 extension_runtime_data_[extension->id()].being_upgraded = value; 1937 extension_runtime_data_[extension->id()].being_upgraded = value;
1930 } 1938 }
1931 1939
1932 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { 1940 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) {
1933 return &extension_runtime_data_[extension->id()].property_bag; 1941 return &extension_runtime_data_[extension->id()].property_bag;
1934 } 1942 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698