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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 7480041: Adding session-only localStorage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Streamlining: Moving ResourceContext& from DOMStorageContext to DOMMessageFilter. Created 9 years, 4 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') | content/browser/content_browser_client.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
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 6b5faf4d08e0632872916c9c6003ce6cd81d2501..45af44e1889e5acd5bff7bba2940f4f5a6bcecc7 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -474,6 +474,19 @@ bool ChromeContentBrowserClient::AllowSaveLocalState(
return !io_data->clear_local_state_on_exit()->GetValue();
}
+bool ChromeContentBrowserClient::EnforceSessionOnlyStorage(
+ const GURL& url,
+ const GURL& first_party_url,
+ const content::ResourceContext& context) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ ProfileIOData* io_data =
+ reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL));
+ ContentSetting setting = io_data->GetHostContentSettingsMap()->
+ GetCookieContentSetting(url, first_party_url, true);
+
+ return (setting == CONTENT_SETTING_SESSION_ONLY);
+}
+
net::URLRequestContext*
ChromeContentBrowserClient::OverrideRequestContextForURL(
const GURL& url, const content::ResourceContext& context) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698