OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions_service.h" | 5 #include "chrome/browser/extensions/extensions_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 BrowserThread::IO, FROM_HERE, | 1275 BrowserThread::IO, FROM_HERE, |
1276 NewRunnableMethod( | 1276 NewRunnableMethod( |
1277 profile_->GetAppCacheService(), | 1277 profile_->GetAppCacheService(), |
1278 &ChromeAppCacheService::SetOriginQuotaInMemory, | 1278 &ChromeAppCacheService::SetOriginQuotaInMemory, |
1279 origin, | 1279 origin, |
1280 kint64max)); | 1280 kint64max)); |
1281 BrowserThread::PostTask( | 1281 BrowserThread::PostTask( |
1282 BrowserThread::IO, FROM_HERE, | 1282 BrowserThread::IO, FROM_HERE, |
1283 NewRunnableMethod( | 1283 NewRunnableMethod( |
1284 profile_->GetFileSystemContext(), | 1284 profile_->GetFileSystemContext(), |
1285 &BrowserFileSystemContext::SetOriginQuotaUnlimited, | 1285 &fileapi::SandboxedFileSystemContext::SetOriginQuotaUnlimited, |
1286 origin)); | 1286 origin)); |
1287 } | 1287 } |
1288 } | 1288 } |
1289 } | 1289 } |
1290 | 1290 |
1291 void ExtensionsService::RevokeUnlimitedStorage(const Extension* extension) { | 1291 void ExtensionsService::RevokeUnlimitedStorage(const Extension* extension) { |
1292 DCHECK(extension->HasApiPermission(Extension::kUnlimitedStoragePermission)); | 1292 DCHECK(extension->HasApiPermission(Extension::kUnlimitedStoragePermission)); |
1293 std::vector<GURL> origins; | 1293 std::vector<GURL> origins; |
1294 GetExplicitOriginsInExtent(extension, &origins); | 1294 GetExplicitOriginsInExtent(extension, &origins); |
1295 origins.push_back(extension->url()); | 1295 origins.push_back(extension->url()); |
(...skipping 14 matching lines...) Expand all Loading... |
1310 BrowserThread::PostTask( | 1310 BrowserThread::PostTask( |
1311 BrowserThread::IO, FROM_HERE, | 1311 BrowserThread::IO, FROM_HERE, |
1312 NewRunnableMethod( | 1312 NewRunnableMethod( |
1313 profile_->GetAppCacheService(), | 1313 profile_->GetAppCacheService(), |
1314 &ChromeAppCacheService::ResetOriginQuotaInMemory, | 1314 &ChromeAppCacheService::ResetOriginQuotaInMemory, |
1315 origin)); | 1315 origin)); |
1316 BrowserThread::PostTask( | 1316 BrowserThread::PostTask( |
1317 BrowserThread::IO, FROM_HERE, | 1317 BrowserThread::IO, FROM_HERE, |
1318 NewRunnableMethod( | 1318 NewRunnableMethod( |
1319 profile_->GetFileSystemContext(), | 1319 profile_->GetFileSystemContext(), |
1320 &BrowserFileSystemContext::ResetOriginQuotaUnlimited, | 1320 &fileapi::SandboxedFileSystemContext::ResetOriginQuotaUnlimited, |
1321 origin)); | 1321 origin)); |
1322 } | 1322 } |
1323 } | 1323 } |
1324 } | 1324 } |
1325 | 1325 |
1326 void ExtensionsService::UpdateExtensionBlacklist( | 1326 void ExtensionsService::UpdateExtensionBlacklist( |
1327 const std::vector<std::string>& blacklist) { | 1327 const std::vector<std::string>& blacklist) { |
1328 // Use this set to indicate if an extension in the blacklist has been used. | 1328 // Use this set to indicate if an extension in the blacklist has been used. |
1329 std::set<std::string> blacklist_set; | 1329 std::set<std::string> blacklist_set; |
1330 for (unsigned int i = 0; i < blacklist.size(); ++i) { | 1330 for (unsigned int i = 0; i < blacklist.size(); ++i) { |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 } | 2086 } |
2087 | 2087 |
2088 void ExtensionsService::SetBeingUpgraded(const Extension* extension, | 2088 void ExtensionsService::SetBeingUpgraded(const Extension* extension, |
2089 bool value) { | 2089 bool value) { |
2090 extension_runtime_data_[extension->id()].being_upgraded = value; | 2090 extension_runtime_data_[extension->id()].being_upgraded = value; |
2091 } | 2091 } |
2092 | 2092 |
2093 PropertyBag* ExtensionsService::GetPropertyBag(const Extension* extension) { | 2093 PropertyBag* ExtensionsService::GetPropertyBag(const Extension* extension) { |
2094 return &extension_runtime_data_[extension->id()].property_bag; | 2094 return &extension_runtime_data_[extension->id()].property_bag; |
2095 } | 2095 } |
OLD | NEW |