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

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: Adding tests. Created 9 years, 5 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/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..86d572c4d94ba57d31cab8134bcce5a713ce4888 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::AllowPermanentStorage(
+ const GURL& url,
+ const GURL& first_party,
+ 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, true);
+
+ return (setting == CONTENT_SETTING_ALLOW);
+}
+
net::URLRequestContext*
ChromeContentBrowserClient::OverrideRequestContextForURL(
const GURL& url, const content::ResourceContext& context) {

Powered by Google App Engine
This is Rietveld 408576698