summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-18 03:04:09 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-18 03:04:09 +0000
commit10eb2816fd7d28974114910aa5bfc105366a187f (patch)
tree7584d8faaa940e6ce8bb08320004ff402160b60e /chrome/browser/extensions
parentf37a6bc327a34487e61beab79c3ec06390a42320 (diff)
downloadchromium_src-10eb2816fd7d28974114910aa5bfc105366a187f.zip
chromium_src-10eb2816fd7d28974114910aa5bfc105366a187f.tar.gz
chromium_src-10eb2816fd7d28974114910aa5bfc105366a187f.tar.bz2
continuing from http://http://codereview.chromium.org/10823241
This intentionally doesn't change the ChromeOS behavior at all. They all still use the default FileSystemContext. This code also exposes the normal and media URLRequestGetters via the StoragePartition, and cleans up a bit of code that was accessing the URLRequestGetter in odd ways. Also, it makes Workers correctly use the Media Cache for Media fetches. TBR=benjhyden,sky,davemoore,piman,mkwst,kalman BUG=85121 Review URL: https://chromiumcodereview.appspot.com/10909182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api_unittest.cc4
-rw-r--r--chrome/browser/extensions/data_deleter.cc5
-rw-r--r--chrome/browser/extensions/extension_service.cc11
3 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index bad27f0..aee109d 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -35,6 +35,7 @@
#include "content/public/browser/download_manager.h"
#include "content/public/browser/download_persistent_store_info.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/test/download_test_observer.h"
@@ -680,7 +681,8 @@ class HTML5FileWriter {
events_listener_(events_listener),
blob_data_(new webkit_blob::BlobData()),
payload_(payload),
- fs_(BrowserContext::GetFileSystemContext(profile_)) {
+ fs_(BrowserContext::GetDefaultStoragePartition(profile_)->
+ GetFileSystemContext()) {
CHECK(profile_);
CHECK(events_listener_);
CHECK(fs_);
diff --git a/chrome/browser/extensions/data_deleter.cc b/chrome/browser/extensions/data_deleter.cc
index 9ce58a8..07cc87a 100644
--- a/chrome/browser/extensions/data_deleter.cc
+++ b/chrome/browser/extensions/data_deleter.cc
@@ -93,15 +93,14 @@ DataDeleter::DataDeleter(
extension_request_context_ = profile->GetRequestContextForExtensions();
} else if (is_storage_isolated) {
extension_request_context_ =
- profile->GetRequestContextForIsolatedApp(extension_id);
+ profile->GetRequestContextForStoragePartition(extension_id);
isolated_app_path_ =
profile->GetPath().Append(
content::StoragePartition::GetPartitionPath(extension_id));
} else {
extension_request_context_ = profile->GetRequestContext();
}
-
- file_system_context_ = BrowserContext::GetFileSystemContext(profile);
+ file_system_context_ = storage_partition->GetFileSystemContext();
indexed_db_context_ = storage_partition->GetIndexedDBContext();
storage_origin_ = storage_origin;
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 8cbd725..96b9ad2 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -121,6 +121,7 @@
#include "chrome/browser/chromeos/extensions/media_player_event_router.h"
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
+#include "content/public/browser/storage_partition.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
#endif
@@ -1107,10 +1108,12 @@ void ExtensionService::NotifyExtensionUnloaded(
profile_, extension->GetChromeURLOverrides());
#if defined(OS_CHROMEOS)
- // Revoke external file access to
- if (BrowserContext::GetFileSystemContext(profile_) &&
- BrowserContext::GetFileSystemContext(profile_)->external_provider()) {
- BrowserContext::GetFileSystemContext(profile_)->external_provider()->
+ // Revoke external file access to third party extensions.
+ fileapi::FileSystemContext* filesystem_context =
+ BrowserContext::GetDefaultStoragePartition(profile_)->
+ GetFileSystemContext();
+ if (filesystem_context && filesystem_context->external_provider()) {
+ filesystem_context->external_provider()->
RevokeAccessForExtension(extension->id());
}