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

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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 UnloadedExtensionInfo details(extension, reason); 1077 UnloadedExtensionInfo details(extension, reason);
1075 NotificationService::current()->Notify( 1078 NotificationService::current()->Notify(
1076 NotificationType::EXTENSION_UNLOADED, 1079 NotificationType::EXTENSION_UNLOADED,
1077 Source<Profile>(profile_), 1080 Source<Profile>(profile_),
1078 Details<UnloadedExtensionInfo>(&details)); 1081 Details<UnloadedExtensionInfo>(&details));
1079 1082
1080 if (profile_) { 1083 if (profile_) {
1081 profile_->UnregisterExtensionWithRequestContexts(extension); 1084 profile_->UnregisterExtensionWithRequestContexts(extension);
1082 profile_->GetExtensionSpecialStoragePolicy()-> 1085 profile_->GetExtensionSpecialStoragePolicy()->
1083 RevokeRightsForExtension(extension); 1086 RevokeRightsForExtension(extension);
1087 #if defined(OS_CHROMEOS)
1088 // Revoke external file access to
1089 profile_->GetFileSystemContext()->path_manager()->external_provider()->
1090 RevokeAccessForExtension(extension->id());
1091 #endif
1084 } 1092 }
1085 1093
1086 bool plugins_changed = false; 1094 bool plugins_changed = false;
1087 for (size_t i = 0; i < extension->plugins().size(); ++i) { 1095 for (size_t i = 0; i < extension->plugins().size(); ++i) {
1088 const Extension::PluginInfo& plugin = extension->plugins()[i]; 1096 const Extension::PluginInfo& plugin = extension->plugins()[i];
1089 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 1097 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
1090 NewRunnableFunction(&ForceShutdownPlugin, 1098 NewRunnableFunction(&ForceShutdownPlugin,
1091 plugin.path)); 1099 plugin.path));
1092 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 1100 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
1093 webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath( 1101 webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 } 1915 }
1908 1916
1909 void ExtensionService::SetBeingUpgraded(const Extension* extension, 1917 void ExtensionService::SetBeingUpgraded(const Extension* extension,
1910 bool value) { 1918 bool value) {
1911 extension_runtime_data_[extension->id()].being_upgraded = value; 1919 extension_runtime_data_[extension->id()].being_upgraded = value;
1912 } 1920 }
1913 1921
1914 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { 1922 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) {
1915 return &extension_runtime_data_[extension->id()].property_bag; 1923 return &extension_runtime_data_[extension->id()].property_bag;
1916 } 1924 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698