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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 6951008: Have AppCache code go through the content embedder API for content settings checks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/cookies_tree_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
===================================================================
--- chrome/browser/chrome_content_browser_client.cc (revision 84527)
+++ chrome/browser/chrome_content_browser_client.cc (working copy)
@@ -9,6 +9,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/chrome_worker_message_filter.h"
+#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/debugger/devtools_handler.h"
#include "chrome/browser/desktop_notification_handler.h"
#include "chrome/browser/extensions/extension_message_handler.h"
@@ -28,6 +29,7 @@
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
+#include "content/browser/resource_context.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/worker_host/worker_process_host.h"
@@ -180,6 +182,14 @@
return g_browser_process->GetApplicationLocale();
}
+bool ChromeContentBrowserClient::AllowAppCache(
+ const GURL& manifest_url, const content::ResourceContext* context) {
+ ContentSetting setting = context->host_content_settings_map()->
+ GetContentSetting(manifest_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ DCHECK(setting != CONTENT_SETTING_DEFAULT);
+ return setting != CONTENT_SETTING_BLOCK;
+}
+
#if defined(OS_LINUX)
int ChromeContentBrowserClient::GetCrashSignalFD(
const std::string& process_type) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/cookies_tree_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698