diff options
-rw-r--r-- | chrome/app/generated_resources.grd | 3 | ||||
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 9 | ||||
-rw-r--r-- | chrome/browser/views/options/advanced_contents_view.cc | 6 | ||||
-rw-r--r-- | net/base/cookie_monster.cc | 4 | ||||
-rw-r--r-- | net/base/cookie_monster.h | 3 | ||||
-rw-r--r-- | net/base/cookie_policy.cc | 4 | ||||
-rw-r--r-- | net/base/cookie_policy.h | 8 |
7 files changed, 5 insertions, 32 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index f711187..33bbbf3 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -3132,9 +3132,6 @@ each locale. --> <message name="IDS_OPTIONS_COOKIES_BLOCK_ALL_COOKIES" desc="The label of the 'Block all cookies' dropdown list item"> Block all cookies </message> - <message name="IDS_OPTIONS_COOKIES_SESSION_COOKIES" desc="The label of the 'Session cookies' dropdown list item"> - Session Cookies - </message> <message name="IDS_OPTIONS_COOKIES_SHOWCOOKIES" desc="The label of the 'Show Cookies' button"> Show cookies </message> diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index eb3a0d0..1c18ed4 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -142,9 +142,7 @@ ChromeURLRequestContext* ChromeURLRequestContext::CreateOriginal( context->cookie_db_.reset(new SQLitePersistentCookieStore( cookie_store_path.ToWStringHack(), g_browser_process->db_thread()->message_loop())); - context->cookie_store_ = new net::CookieMonster( - context->cookie_policy_.GetType() == - net::CookiePolicy::SESSION_COOKIES ? NULL : context->cookie_db_.get()); + context->cookie_store_ = new net::CookieMonster(context->cookie_db_.get()); } return context; @@ -392,11 +390,6 @@ void ChromeURLRequestContext::OnCookiePolicyChange( DCHECK(MessageLoop::current() == ChromeThread::GetMessageLoop(ChromeThread::IO)); cookie_policy_.SetType(type); - - if (is_off_the_record_ || type == net::CookiePolicy::SESSION_COOKIES) - cookie_store_->SetStore(NULL); - else - cookie_store_->SetStore(cookie_db_.get()); } void ChromeURLRequestContext::OnNewExtensions(ExtensionPaths* new_paths) { diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc index 1d56393..a1ed601 100644 --- a/chrome/browser/views/options/advanced_contents_view.cc +++ b/chrome/browser/views/options/advanced_contents_view.cc @@ -286,15 +286,14 @@ class CookieBehaviorComboModel : public views::ComboBox::Model { // Return the number of items in the combo box. virtual int GetItemCount(views::ComboBox* source) { - return 4; + return 3; } virtual std::wstring GetItemAt(views::ComboBox* source, int index) { const int kStringIDs[] = { IDS_OPTIONS_COOKIES_ACCEPT_ALL_COOKIES, IDS_OPTIONS_COOKIES_RESTRICT_THIRD_PARTY_COOKIES, - IDS_OPTIONS_COOKIES_BLOCK_ALL_COOKIES, - IDS_OPTIONS_COOKIES_SESSION_COOKIES + IDS_OPTIONS_COOKIES_BLOCK_ALL_COOKIES }; if (index >= 0 && index < arraysize(kStringIDs)) return l10n_util::GetString(kStringIDs[index]); @@ -473,7 +472,6 @@ void PrivacySection::ItemChanged(views::ComboBox* sender, const wchar_t* kUserMetrics[] = { L"Options_AllowAllCookies", L"Options_BlockThirdPartyCookies", - L"Options_SessionCookies", L"Options_BlockAllCookies" }; DCHECK(cookie_policy >= 0 && cookie_policy < arraysize(kUserMetrics)); diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc index 7eb487e..470bfc2 100644 --- a/net/base/cookie_monster.cc +++ b/net/base/cookie_monster.cc @@ -711,10 +711,6 @@ bool CookieMonster::DeleteCookie(const std::string& domain, return false; } -void CookieMonster::SetStore(PersistentCookieStore* store) { - store_ = store; -} - // Mozilla sorts on the path length (longest first), and then it // sorts by creation time (oldest first). // The RFC says the sort order for the domain attribute is undefined. diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h index 69750e5..24db893 100644 --- a/net/base/cookie_monster.h +++ b/net/base/cookie_monster.h @@ -134,9 +134,6 @@ class CookieMonster { const CanonicalCookie& cookie, bool sync_to_store); - // Sets the store, possibly to null for session only cookies. - void SetStore(PersistentCookieStore* store); - // Override the default list of schemes that are allowed to be set in // this cookie store. Calling his overrides the value of // "enable_file_scheme_". diff --git a/net/base/cookie_policy.cc b/net/base/cookie_policy.cc index 8eb1179..d18db63 100644 --- a/net/base/cookie_policy.cc +++ b/net/base/cookie_policy.cc @@ -16,8 +16,6 @@ bool CookiePolicy::CanGetCookies(const GURL& url, const GURL& policy_url) { return true; case CookiePolicy::BLOCK_THIRD_PARTY_COOKIES: return true; - case CookiePolicy::SESSION_COOKIES: - return true; case CookiePolicy::BLOCK_ALL_COOKIES: return false; default: @@ -35,8 +33,6 @@ bool CookiePolicy::CanSetCookie(const GURL& url, const GURL& policy_url) { return true; // Empty policy URL should indicate a first-party request return net::RegistryControlledDomainService::SameDomainOrHost(url, policy_url); - case CookiePolicy::SESSION_COOKIES: - return true; case CookiePolicy::BLOCK_ALL_COOKIES: return false; default: diff --git a/net/base/cookie_policy.h b/net/base/cookie_policy.h index 6fa6002..89d490b 100644 --- a/net/base/cookie_policy.h +++ b/net/base/cookie_policy.h @@ -25,12 +25,11 @@ class CookiePolicy { enum Type { ALLOW_ALL_COOKIES = 0, // do not perform any cookie blocking BLOCK_THIRD_PARTY_COOKIES, // prevent third-party cookies from being sent - BLOCK_ALL_COOKIES, // disable cookies - SESSION_COOKIES // expire all cookies at end of session + BLOCK_ALL_COOKIES // disable cookies }; static bool ValidType(int32 type) { - return type >= ALLOW_ALL_COOKIES && type <= SESSION_COOKIES; + return type >= ALLOW_ALL_COOKIES && type <= BLOCK_ALL_COOKIES; } static Type FromInt(int32 type) { @@ -41,9 +40,6 @@ class CookiePolicy { // preferences change. void SetType(Type type) { type_ = type; } - // Get the current policy. - Type GetType() const { return type_; } - CookiePolicy(); private: |