diff options
Diffstat (limited to 'chrome/browser/extensions/extensions_service.cc')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 9cf2fb9..0a5f145 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -4,9 +4,11 @@ #include "chrome/browser/extensions/extensions_service.h" +#include "base/basictypes.h" #include "base/command_line.h" #include "base/file_util.h" #include "base/histogram.h" +#include "base/string16.h" #include "base/string_util.h" #include "base/time.h" #include "base/values.h" @@ -38,6 +40,8 @@ #include "chrome/common/notification_type.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" +#include "webkit/database/database_tracker.h" +#include "webkit/database/database_util.h" #if defined(OS_WIN) #include "chrome/browser/extensions/external_registry_extension_provider_win.h" @@ -462,6 +466,19 @@ void ExtensionsService::NotifyExtensionLoaded(Extension* extension) { extension->app_extent(), extension->api_permissions()))); } + + // Check if this permission requires unlimited storage quota + if (extension->HasApiPermission(Extension::kUnlimitedStoragePermission)) { + string16 origin_identifier = + webkit_database::DatabaseUtil::GetOriginIdentifier(extension->url()); + ChromeThread::PostTask( + ChromeThread::FILE, FROM_HERE, + NewRunnableMethod( + profile_->GetDatabaseTracker(), + &webkit_database::DatabaseTracker::SetOriginQuotaInMemory, + origin_identifier, + kint64max)); + } } NotificationService::current()->Notify( |