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

Side by Side 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: updates Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 2122
2123 void TabContents::OnInstantSupportDetermined(int32 page_id, bool result) { 2123 void TabContents::OnInstantSupportDetermined(int32 page_id, bool result) {
2124 if (delegate()) 2124 if (delegate())
2125 delegate()->OnInstantSupportDetermined(page_id, result); 2125 delegate()->OnInstantSupportDetermined(page_id, result);
2126 } 2126 }
2127 2127
2128 void TabContents::DidStartProvisionalLoadForFrame( 2128 void TabContents::DidStartProvisionalLoadForFrame(
2129 RenderViewHost* render_view_host, 2129 RenderViewHost* render_view_host,
2130 long long frame_id, 2130 long long frame_id,
2131 bool is_main_frame, 2131 bool is_main_frame,
2132 bool is_unreachable_web_data,
darin (slow to review) 2010/11/30 18:28:57 nit: "is_error_page" seems like a better choice fo
2132 const GURL& url) { 2133 const GURL& url) {
2133 ProvisionalLoadDetails details(is_main_frame, 2134 ProvisionalLoadDetails details(is_main_frame,
2134 controller_.IsURLInPageNavigation(url), 2135 controller_.IsURLInPageNavigation(url),
2135 url, std::string(), false, frame_id); 2136 url, std::string(), false, frame_id);
2136 NotificationService::current()->Notify( 2137 NotificationService::current()->Notify(
2137 NotificationType::FRAME_PROVISIONAL_LOAD_START, 2138 NotificationType::FRAME_PROVISIONAL_LOAD_START,
2138 Source<NavigationController>(&controller_), 2139 Source<NavigationController>(&controller_),
2139 Details<ProvisionalLoadDetails>(&details)); 2140 Details<ProvisionalLoadDetails>(&details));
2140 if (is_main_frame) { 2141 if (is_main_frame) {
2141 content_settings_delegate_->ClearCookieSpecificContentSettings(); 2142 // If we're displaying a network error page do not reset the content
2143 // settings delegate's cookies so the user has a chance to modify cookie
2144 // settings.
2145 if (!is_unreachable_web_data)
2146 content_settings_delegate_->ClearCookieSpecificContentSettings();
2142 content_settings_delegate_->ClearGeolocationContentSettings(); 2147 content_settings_delegate_->ClearGeolocationContentSettings();
2143 } 2148 }
2144 } 2149 }
2145 2150
2146 void TabContents::DidStartReceivingResourceResponse( 2151 void TabContents::DidStartReceivingResourceResponse(
2147 const ResourceRequestDetails& details) { 2152 const ResourceRequestDetails& details) {
2148 NotificationService::current()->Notify( 2153 NotificationService::current()->Notify(
2149 NotificationType::RESOURCE_RESPONSE_STARTED, 2154 NotificationType::RESOURCE_RESPONSE_STARTED,
2150 Source<NavigationController>(&controller()), 2155 Source<NavigationController>(&controller()),
2151 Details<const ResourceRequestDetails>(&details)); 2156 Details<const ResourceRequestDetails>(&details));
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
3230 } 3235 }
3231 3236
3232 void TabContents::set_encoding(const std::string& encoding) { 3237 void TabContents::set_encoding(const std::string& encoding) {
3233 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 3238 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
3234 } 3239 }
3235 3240
3236 void TabContents::SetAppIcon(const SkBitmap& app_icon) { 3241 void TabContents::SetAppIcon(const SkBitmap& app_icon) {
3237 app_icon_ = app_icon; 3242 app_icon_ = app_icon;
3238 NotifyNavigationStateChanged(INVALIDATE_TITLE); 3243 NotifyNavigationStateChanged(INVALIDATE_TITLE);
3239 } 3244 }
OLDNEW
« 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