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

Unified Diff: chrome/browser/ui/webui/options/cookies_view_handler.cc

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Android's BrowserContext. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/cookies_view_handler.cc
diff --git a/chrome/browser/ui/webui/options/cookies_view_handler.cc b/chrome/browser/ui/webui/options/cookies_view_handler.cc
index 065c3dc51829c12fd65897090aaeb2c235a88b74..2656850f8c09e52893155a335df0aed884cff3da 100644
--- a/chrome/browser/ui/webui/options/cookies_view_handler.cc
+++ b/chrome/browser/ui/webui/options/cookies_view_handler.cc
@@ -22,9 +22,12 @@
#include "chrome/browser/browsing_data/browsing_data_quota_helper.h"
#include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/cookies_tree_model_util.h"
#include "content/public/browser/browser_context.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
@@ -223,13 +226,18 @@ void CookiesViewHandler::EnsureCookiesTreeModelCreated() {
Profile* profile = Profile::FromWebUI(web_ui());
ContainerMap apps_map;
const ExtensionService* service = profile->GetExtensionService();
- if (service) {
+ ExtensionProcessManager* process_manager =
+ extensions::ExtensionSystem::Get(profile)->process_manager();
+ if (service && process_manager) {
James Hawkins 2012/10/30 17:40:53 Save indentation and processing by returning early
nasko 2012/10/30 19:55:25 Done.
const ExtensionSet* extensions = service->extensions();
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
if ((*it)->is_storage_isolated()) {
+ content::StoragePartition* storage_partition =
+ content::BrowserContext::GetStoragePartitionForSite(profile,
+ (*it)->url());
net::URLRequestContextGetter* context_getter =
- profile->GetRequestContextForStoragePartition((*it)->id());
+ storage_partition->GetURLRequestContext();
Charlie Reis 2012/10/30 17:47:48 nit: 2 more spaces
nasko 2012/10/30 19:55:25 Done.
// TODO(nasko): When new types of storage are isolated, add the
// appropriate browsing data helper objects to the constructor.
// For now, just cookies are isolated, so other parameters are NULL.
Charlie Reis 2012/10/30 17:47:48 Nasko, is this still true? We do isolate other ty
nasko 2012/10/30 19:55:25 Based on our discussion from yesterday, since isol
Charlie Reis 2012/10/30 20:13:07 Ok.

Powered by Google App Engine
This is Rietveld 408576698