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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 5254005: Do not reset the content settings delegate's cookies when a network error occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/tab_contents
Patch Set: rebase Created 10 years, 1 month 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/tab_contents/tab_contents.h ('k') | chrome/test/data/redirect-loop.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.cc
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 2e92d5510e9bbb0915f9a0b68d82937cfd8e2304..6ec6ba34332303468e641388883569d82d954306 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2139,6 +2139,7 @@ void TabContents::DidStartProvisionalLoadForFrame(
RenderViewHost* render_view_host,
int64 frame_id,
bool is_main_frame,
+ bool is_error_page,
const GURL& url) {
ProvisionalLoadDetails details(is_main_frame,
controller_.IsURLInPageNavigation(url),
@@ -2148,7 +2149,11 @@ void TabContents::DidStartProvisionalLoadForFrame(
Source<NavigationController>(&controller_),
Details<ProvisionalLoadDetails>(&details));
if (is_main_frame) {
- content_settings_delegate_->ClearCookieSpecificContentSettings();
+ // If we're displaying a network error page do not reset the content
+ // settings delegate's cookies so the user has a chance to modify cookie
+ // settings.
+ if (!is_error_page)
+ content_settings_delegate_->ClearCookieSpecificContentSettings();
content_settings_delegate_->ClearGeolocationContentSettings();
}
}
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/test/data/redirect-loop.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698