| 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 3e6639c9ddf814a4d642a297f7d01739f6e59ca4..da9bb510e8e95487915e936ea185d21a8da666ed 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -13,6 +13,7 @@
|
| #include "chrome/browser/chrome_plugin_message_filter.h"
|
| #include "chrome/browser/chrome_quota_permission_context.h"
|
| #include "chrome/browser/chrome_worker_message_filter.h"
|
| +#include "chrome/browser/content_settings/cookie_settings.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| #include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| #include "chrome/browser/download/download_util.h"
|
| @@ -390,10 +391,8 @@ bool ChromeContentBrowserClient::AllowAppCache(
|
| ProfileIOData* io_data =
|
| reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL));
|
| // FIXME(jochen): get the correct top-level origin.
|
| - ContentSetting setting = io_data->GetHostContentSettingsMap()->
|
| - GetCookieContentSetting(manifest_url, manifest_url, true);
|
| - DCHECK(setting != CONTENT_SETTING_DEFAULT);
|
| - return setting != CONTENT_SETTING_BLOCK;
|
| + return io_data->GetCookieSettings()->
|
| + IsSettingCookieAllowed(manifest_url, manifest_url);
|
| }
|
|
|
| bool ChromeContentBrowserClient::AllowGetCookie(
|
| @@ -406,10 +405,8 @@ bool ChromeContentBrowserClient::AllowGetCookie(
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| ProfileIOData* io_data =
|
| reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL));
|
| - ContentSetting setting = io_data->GetHostContentSettingsMap()->
|
| - GetCookieContentSetting(url, first_party, false);
|
| - bool allow = setting == CONTENT_SETTING_ALLOW ||
|
| - setting == CONTENT_SETTING_SESSION_ONLY;
|
| + bool allow = io_data->GetCookieSettings()->
|
| + IsReadingCookieAllowed(url, first_party);
|
|
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| @@ -430,14 +427,12 @@ bool ChromeContentBrowserClient::AllowSetCookie(
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| ProfileIOData* io_data =
|
| reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL));
|
| - ContentSetting setting = io_data->GetHostContentSettingsMap()->
|
| - GetCookieContentSetting(url, first_party, true);
|
|
|
| - if (setting == CONTENT_SETTING_SESSION_ONLY)
|
| - options->set_force_session();
|
| + CookieSettings* cookie_settings = io_data->GetCookieSettings();
|
| + bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party);
|
|
|
| - bool allow = setting == CONTENT_SETTING_ALLOW ||
|
| - setting == CONTENT_SETTING_SESSION_ONLY;
|
| + if (cookie_settings->IsCookieSessionOnly(url))
|
| + options->set_force_session();
|
|
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
|
|